/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.13
 *
 * 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.
 * ----------------------------------------------------------------------------- */


#ifndef SWIGPHP
#define SWIGPHP
#endif

#define SWIG_DIRECTORS
#define SWIG_PREFIX "Xapian"
#define SWIG_PREFIX_LEN 6

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

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

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

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

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

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

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

/* -----------------------------------------------------------------------------
 * 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(r) (r)
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

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

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

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

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

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

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

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}

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

/*
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(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) {
      size_t l = 0;
      size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	size_t i = (l + r) >> 1;
	const char *iname = iter->types[i]->name;
	if (iname) {
	  int compare = strcmp(name, iname);
	  if (compare == 0) {
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).

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

  /* neither found a match */
  return 0;
}

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

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

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

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

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

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

#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------
 * phprun.swg
 *
 * PHP runtime library
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif
#include "zend.h"
#include "zend_API.h"
#include "zend_exceptions.h"
#include "php.h"

#if PHP_MAJOR_VERSION != 5
# error These bindings need PHP5 - to generate PHP7 bindings use: swig -php7
#endif

#include "ext/standard/php_string.h"
#include <stdlib.h> /* for abort(), used in generated code. */

#ifdef ZEND_RAW_FENTRY
/* ZEND_RAW_FENTRY was added somewhere between 5.2.0 and 5.2.3 */
# define SWIG_ZEND_NAMED_FE(ZN, N, A) ZEND_RAW_FENTRY((char*)#ZN, N, A, 0)
#else
/* This causes warnings from GCC >= 4.2 (assigning a string literal to char*).
 * But this seems to be unavoidable without directly assuming knowledge of
 * the structure, which changed between PHP4 and PHP5. */
# define SWIG_ZEND_NAMED_FE(ZN, N, A) ZEND_NAMED_FE(ZN, N, A)
#endif

#ifndef ZEND_FE_END
# define ZEND_FE_END { NULL, NULL, NULL }
#endif

#ifndef Z_SET_ISREF_P
/* For PHP < 5.3 */
# define Z_SET_ISREF_P(z) (z)->is_ref = 1
#endif
#ifndef Z_SET_REFCOUNT_P
/* For PHP < 5.3 */
# define Z_SET_REFCOUNT_P(z, rc) (z)->refcount = (rc)
#endif

#define SWIG_LONG_CONSTANT(N, V) zend_register_long_constant((char*)#N, sizeof(#N), V, CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC)
#define SWIG_DOUBLE_CONSTANT(N, V) zend_register_double_constant((char*)#N, sizeof(#N), V, CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC)
#define SWIG_STRING_CONSTANT(N, V) zend_register_stringl_constant((char*)#N, sizeof(#N), (char*)(V), strlen(V), CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC)
#define SWIG_CHAR_CONSTANT(N, V) do {\
    static char swig_char = (V);\
    zend_register_stringl_constant((char*)#N, sizeof(#N), &swig_char, 1, CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC);\
} while (0)

/* These TSRMLS_ stuff should already be defined now, but with older php under
   redhat are not... */
#ifndef TSRMLS_D
#define TSRMLS_D
#endif
#ifndef TSRMLS_DC
#define TSRMLS_DC
#endif
#ifndef TSRMLS_C
#define TSRMLS_C
#endif
#ifndef TSRMLS_CC
#define TSRMLS_CC
#endif

#ifdef __cplusplus
}
#endif

/* But in fact SWIG_ConvertPtr is the native interface for getting typed
   pointer values out of zvals.  We need the TSRMLS_ macros for when we
   make PHP type calls later as we handle php resources */
#define SWIG_ConvertPtr(obj,pp,type,flags) SWIG_ZTS_ConvertPtr(obj,pp,type,flags TSRMLS_CC)


#define SWIG_fail goto fail

static const char *default_error_msg = "Unknown error occurred";
static int default_error_code = E_ERROR;

#define SWIG_PHP_Arg_Error_Msg(argnum,extramsg) "Error in argument " #argnum " "#extramsg

#define SWIG_PHP_Error(code,msg) do { SWIG_ErrorCode() = code; SWIG_ErrorMsg() = msg; SWIG_fail; } while (0)

#define SWIG_contract_assert(expr,msg) \
  if (!(expr) ) { zend_printf("Contract Assert Failed %s\n",msg ); } else

/* Standard SWIG API */
#define SWIG_GetModule(clientdata) SWIG_Php_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Php_SetModule(pointer)

/* used to wrap returned objects in so we know whether they are newobject
   and need freeing, or not */
typedef struct {
  void * ptr;
  int newobject;
} swig_object_wrapper;

#define SWIG_SetPointerZval(a,b,c,d) SWIG_ZTS_SetPointerZval(a,b,c,d TSRMLS_CC)
#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))

static void
SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject TSRMLS_DC) {
  /*
   * First test for Null pointers.  Return those as PHP native NULL
   */
  if (!ptr ) {
    ZVAL_NULL(z);
    return;
  }
  if (type->clientdata) {
    swig_object_wrapper *value;
    if (! (*(int *)(type->clientdata)))
      zend_error(E_ERROR, "Type: %s failed to register with zend",type->name);
    value=(swig_object_wrapper *)emalloc(sizeof(swig_object_wrapper));
    value->ptr=ptr;
    value->newobject=(newobject & 1);
    if ((newobject & 2) == 0) {
      /* Just register the pointer as a resource. */
      ZEND_REGISTER_RESOURCE(z, value, *(int *)(type->clientdata));
    } else {
      /*
       * Wrap the resource in an object, the resource will be accessible
       * via the "_cPtr" member. This is currently only used by
       * directorin typemaps.
       */
      zval *resource;
      zend_class_entry **ce = NULL;
      const char *type_name = type->name+3; /* +3 so: _p_Foo -> Foo */
      size_t type_name_len;
      int result;
      const char * p;

      /* Namespace__Foo -> Foo */
      /* FIXME: ugly and goes wrong for classes with __ in their names. */
      while ((p = strstr(type_name, "__")) != NULL) {
        type_name = p + 2;
      }
      type_name_len = strlen(type_name);

      MAKE_STD_ZVAL(resource);
      ZEND_REGISTER_RESOURCE(resource, value, *(int *)(type->clientdata));
      if (SWIG_PREFIX_LEN > 0) {
        char * classname = (char*)emalloc(SWIG_PREFIX_LEN + type_name_len + 1);
        strcpy(classname, SWIG_PREFIX);
        strcpy(classname + SWIG_PREFIX_LEN, type_name);
        result = zend_lookup_class(classname, SWIG_PREFIX_LEN + type_name_len, &ce TSRMLS_CC);
        efree(classname);
      } else {
        result = zend_lookup_class((char *)type_name, type_name_len, &ce TSRMLS_CC);
      }
      if (result != SUCCESS) {
        /* class does not exist */
        object_init(z);
      } else {
        object_init_ex(z, *ce);
      }
      Z_SET_REFCOUNT_P(z, 1);
      Z_SET_ISREF_P(z);
      zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"), (void*)&resource, sizeof(zval*), NULL);
    }
    return;
  }
  zend_error(E_ERROR, "Type: %s not registered with zend",type->name);
}

/* This pointer conversion routine takes the native pointer p (along with
   its type name) and converts it by calling appropriate casting functions
   according to ty.  The resultant pointer is returned, or NULL is returned
   if the pointer can't be cast.

   Sadly PHP has no API to find a type name from a type id, only from an
   instance of a resource of the type id, so we have to pass type_name as well.

   The two functions which might call this are:
   SWIG_ZTS_ConvertResourcePtr which gets the type name from the resource
   and the registered zend destructors for which we have one per type each
   with the type name hard wired in. */
static void *
SWIG_ZTS_ConvertResourceData(void * p, const char *type_name, swig_type_info *ty TSRMLS_DC) {
  swig_cast_info *tc;
  void *result = 0;

  if (!ty) {
    /* They don't care about the target type, so just pass on the pointer! */
    return p;
  }

  if (! type_name) {  
    /* can't convert p to ptr type ty if we don't know what type p is */
    return NULL;
  }

  /* convert and cast p from type_name to ptr as ty. */
  tc = SWIG_TypeCheck(type_name, ty);
  if (tc) {
    int newmemory = 0;
    result = SWIG_TypeCast(tc, p, &newmemory);
    assert(!newmemory); /* newmemory handling not yet implemented */
  }
  return result;
}

/* This function returns a pointer of type ty by extracting the pointer
   and type info from the resource in z.  z must be a resource.
   If it fails, NULL is returned.
   It uses SWIG_ZTS_ConvertResourceData to do the real work. */
static void *
SWIG_ZTS_ConvertResourcePtr(zval *z, swig_type_info *ty, int flags TSRMLS_DC) {
  swig_object_wrapper *value;
  void *p;
  int type;
  const char *type_name;

  value = (swig_object_wrapper *) zend_list_find(z->value.lval, &type);
  if (type==-1) return NULL;
  if (flags & SWIG_POINTER_DISOWN) {
    value->newobject = 0;
  }
  p = value->ptr;

  type_name=zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC);

  return SWIG_ZTS_ConvertResourceData(p, type_name, ty TSRMLS_CC);
}

/* We allow passing of a RESOURCE pointing to the object or an OBJECT whose
   _cPtr is a resource pointing to the object */
static int
SWIG_ZTS_ConvertPtr(zval *z, void **ptr, swig_type_info *ty, int flags TSRMLS_DC) {
  if (z == NULL) {
    *ptr = 0;
    return 0;
  }

  switch (z->type) {
    case IS_OBJECT: {
      zval ** _cPtr;
      if (zend_hash_find(HASH_OF(z),(char*)"_cPtr",sizeof("_cPtr"),(void**)&_cPtr)==SUCCESS) {
	if ((*_cPtr)->type==IS_RESOURCE) {
	  *ptr = SWIG_ZTS_ConvertResourcePtr(*_cPtr, ty, flags TSRMLS_CC);
	  return (*ptr == NULL ? -1 : 0);
	}
      }
      break;
    }
    case IS_RESOURCE:
      *ptr = SWIG_ZTS_ConvertResourcePtr(z, ty, flags TSRMLS_CC);
      return (*ptr == NULL ? -1 : 0);
    case IS_NULL:
      *ptr = 0;
      return 0;
  }

  return -1;
}

static char const_name[] = "swig_runtime_data_type_pointer";
static swig_module_info *SWIG_Php_GetModule() {
  zval *pointer;
  swig_module_info *ret = 0;
  TSRMLS_FETCH();

  MAKE_STD_ZVAL(pointer);

  if (zend_get_constant(const_name, sizeof(const_name) - 1, pointer TSRMLS_CC)) {
    if (pointer->type == IS_LONG) {
      ret = (swig_module_info *) pointer->value.lval;
    }
  } 
  FREE_ZVAL(pointer);
  return ret; 
}

static void SWIG_Php_SetModule(swig_module_info *pointer) {
  TSRMLS_FETCH();
  REGISTER_MAIN_LONG_CONSTANT(const_name, (long) pointer, CONST_PERSISTENT | CONST_CS);
}

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




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

#define SWIGTYPE_int swig_types[0]
#define SWIGTYPE_p_Xapian__BB2Weight swig_types[1]
#define SWIGTYPE_p_Xapian__BM25PlusWeight swig_types[2]
#define SWIGTYPE_p_Xapian__BM25Weight swig_types[3]
#define SWIGTYPE_p_Xapian__BoolWeight swig_types[4]
#define SWIGTYPE_p_Xapian__Compactor swig_types[5]
#define SWIGTYPE_p_Xapian__CoordWeight swig_types[6]
#define SWIGTYPE_p_Xapian__DLHWeight swig_types[7]
#define SWIGTYPE_p_Xapian__DPHWeight swig_types[8]
#define SWIGTYPE_p_Xapian__Database swig_types[9]
#define SWIGTYPE_p_Xapian__DateRangeProcessor swig_types[10]
#define SWIGTYPE_p_Xapian__DateValueRangeProcessor swig_types[11]
#define SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource swig_types[12]
#define SWIGTYPE_p_Xapian__Document swig_types[13]
#define SWIGTYPE_p_Xapian__ESet swig_types[14]
#define SWIGTYPE_p_Xapian__ESetIterator swig_types[15]
#define SWIGTYPE_p_Xapian__Enquire swig_types[16]
#define SWIGTYPE_p_Xapian__ExpandDecider swig_types[17]
#define SWIGTYPE_p_Xapian__ExpandDeciderAnd swig_types[18]
#define SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix swig_types[19]
#define SWIGTYPE_p_Xapian__ExpandDeciderFilterTerms swig_types[20]
#define SWIGTYPE_p_Xapian__FieldProcessor swig_types[21]
#define SWIGTYPE_p_Xapian__FixedWeightPostingSource swig_types[22]
#define SWIGTYPE_p_Xapian__GreatCircleMetric swig_types[23]
#define SWIGTYPE_p_Xapian__IfB2Weight swig_types[24]
#define SWIGTYPE_p_Xapian__InL2Weight swig_types[25]
#define SWIGTYPE_p_Xapian__IneB2Weight swig_types[26]
#define SWIGTYPE_p_Xapian__KeyMaker swig_types[27]
#define SWIGTYPE_p_Xapian__LMWeight swig_types[28]
#define SWIGTYPE_p_Xapian__LatLongCoord swig_types[29]
#define SWIGTYPE_p_Xapian__LatLongCoords swig_types[30]
#define SWIGTYPE_p_Xapian__LatLongCoordsIterator swig_types[31]
#define SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker swig_types[32]
#define SWIGTYPE_p_Xapian__LatLongDistancePostingSource swig_types[33]
#define SWIGTYPE_p_Xapian__LatLongMetric swig_types[34]
#define SWIGTYPE_p_Xapian__MSet swig_types[35]
#define SWIGTYPE_p_Xapian__MSetIterator swig_types[36]
#define SWIGTYPE_p_Xapian__MatchDecider swig_types[37]
#define SWIGTYPE_p_Xapian__MatchSpy swig_types[38]
#define SWIGTYPE_p_Xapian__MultiValueKeyMaker swig_types[39]
#define SWIGTYPE_p_Xapian__NumberRangeProcessor swig_types[40]
#define SWIGTYPE_p_Xapian__NumberValueRangeProcessor swig_types[41]
#define SWIGTYPE_p_Xapian__PL2PlusWeight swig_types[42]
#define SWIGTYPE_p_Xapian__PL2Weight swig_types[43]
#define SWIGTYPE_p_Xapian__PositionIterator swig_types[44]
#define SWIGTYPE_p_Xapian__PostingIterator swig_types[45]
#define SWIGTYPE_p_Xapian__PostingSource swig_types[46]
#define SWIGTYPE_p_Xapian__Query swig_types[47]
#define SWIGTYPE_p_Xapian__QueryParser swig_types[48]
#define SWIGTYPE_p_Xapian__RSet swig_types[49]
#define SWIGTYPE_p_Xapian__RangeProcessor swig_types[50]
#define SWIGTYPE_p_Xapian__Registry swig_types[51]
#define SWIGTYPE_p_Xapian__SimpleStopper swig_types[52]
#define SWIGTYPE_p_Xapian__Stem swig_types[53]
#define SWIGTYPE_p_Xapian__StemImplementation swig_types[54]
#define SWIGTYPE_p_Xapian__Stopper swig_types[55]
#define SWIGTYPE_p_Xapian__StringValueRangeProcessor swig_types[56]
#define SWIGTYPE_p_Xapian__TermGenerator swig_types[57]
#define SWIGTYPE_p_Xapian__TermIterator swig_types[58]
#define SWIGTYPE_p_Xapian__TfIdfWeight swig_types[59]
#define SWIGTYPE_p_Xapian__TradWeight swig_types[60]
#define SWIGTYPE_p_Xapian__ValueCountMatchSpy swig_types[61]
#define SWIGTYPE_p_Xapian__ValueIterator swig_types[62]
#define SWIGTYPE_p_Xapian__ValueMapPostingSource swig_types[63]
#define SWIGTYPE_p_Xapian__ValuePostingSource swig_types[64]
#define SWIGTYPE_p_Xapian__ValueRangeProcessor swig_types[65]
#define SWIGTYPE_p_Xapian__ValueSetMatchDecider swig_types[66]
#define SWIGTYPE_p_Xapian__ValueWeightPostingSource swig_types[67]
#define SWIGTYPE_p_Xapian__Weight swig_types[68]
#define SWIGTYPE_p_Xapian__WritableDatabase swig_types[69]
#define SWIGTYPE_p_compaction_level swig_types[70]
#define SWIGTYPE_p_docid_order swig_types[71]
#define SWIGTYPE_p_double swig_types[72]
#define SWIGTYPE_p_feature_flag swig_types[73]
#define SWIGTYPE_p_flags swig_types[74]
#define SWIGTYPE_p_int swig_types[75]
#define SWIGTYPE_p_std__string swig_types[76]
#define SWIGTYPE_p_stem_strategy swig_types[77]
#define SWIGTYPE_p_stop_strategy swig_types[78]
#define SWIGTYPE_p_type_smoothing swig_types[79]
#define SWIGTYPE_p_unsigned_int swig_types[80]
#define SWIGTYPE_p_unsigned_long swig_types[81]
#define SWIGTYPE_unsigned_int swig_types[82]
static swig_type_info *swig_types[84];
static swig_module_info swig_module = {swig_types, 83, 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) -------- */

/* header section */
ZEND_BEGIN_MODULE_GLOBALS(xapian)
const char *error_msg;
int error_code;
ZEND_END_MODULE_GLOBALS(xapian)
ZEND_DECLARE_MODULE_GLOBALS(xapian)
#ifdef ZTS
#define SWIG_ErrorMsg() TSRMG(xapian_globals_id, zend_xapian_globals *, error_msg )
#define SWIG_ErrorCode() TSRMG(xapian_globals_id, zend_xapian_globals *, error_code )
#else
#define SWIG_ErrorMsg() (xapian_globals.error_msg)
#define SWIG_ErrorCode() (xapian_globals.error_code)
#endif

#ifdef __GNUC__
static void SWIG_FAIL(TSRMLS_D) __attribute__ ((__noreturn__));
#endif

static void SWIG_FAIL(TSRMLS_D) {
    zend_error(SWIG_ErrorCode(), "%s", SWIG_ErrorMsg());
    abort();
}

static void xapian_init_globals(zend_xapian_globals *globals ) {
  globals->error_msg = default_error_msg;
  globals->error_code = default_error_code;
}
static void SWIG_ResetError(TSRMLS_D) {
  SWIG_ErrorMsg() = default_error_msg;
  SWIG_ErrorCode() = default_error_code;
}

ZEND_NAMED_FUNCTION(_wrap_swig_xapian_alter_newobject) {
  zval **args[2];
  swig_object_wrapper *value;
  int type;

  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }

  value = (swig_object_wrapper *) zend_list_find((*args[0])->value.lval, &type);
  value->newobject = zval_is_true(*args[1]);

  return;
}
ZEND_NAMED_FUNCTION(_wrap_swig_xapian_get_newobject) {
  zval **args[1];
  swig_object_wrapper *value;
  int type;

  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }

  value = (swig_object_wrapper *) zend_list_find((*args[0])->value.lval, &type);
  RETVAL_LONG(value->newobject);

  return;
}
#define SWIG_name  "xapian"
#ifdef __cplusplus
extern "C" {
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_xapian.h"
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------
 * director_common.swg
 *
 * This file contains support for director classes which is common between
 * languages.
 * ----------------------------------------------------------------------------- */

/*
  Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the
  'Swig' namespace. This could be useful for multi-modules projects.
*/
#ifdef SWIG_DIRECTOR_STATIC
/* Force anonymous (static) namespace */
#define Swig
#endif
/* -----------------------------------------------------------------------------
 * director.swg
 *
 * This file contains support for director classes so that PHP proxy
 * methods can be called from C++.
 * ----------------------------------------------------------------------------- */

#ifndef SWIG_DIRECTOR_PHP_HEADER_
#define SWIG_DIRECTOR_PHP_HEADER_

#include <string>
#include <exception>
#include <map>

namespace Swig {

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

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

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

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

    ~GCItem_var() {
      delete _item;
    }

    GCItem * operator->() const {
      return _item;
    }

    private:
    GCItem *_item;
  };

  struct GCItem_Object : GCItem {
    GCItem_Object(int own) : _own(own) {
    }

    virtual ~GCItem_Object() {
    }

    int get_own() const {
      return _own;
    }

    private:
    int _own;
  };

  template <typename Type>
  struct GCItem_T : GCItem {
    GCItem_T(Type *ptr) : _ptr(ptr) {
    }

    virtual ~GCItem_T() {
      delete _ptr;
    }

    private:
    Type *_ptr;
  };

  class Director {
    protected:
      zval *swig_self;
      typedef std::map<void *, GCItem_var> swig_ownership_map;
      mutable swig_ownership_map swig_owner;
#ifdef ZTS
      // Store the ZTS context so it's available when C++ calls back to PHP.
      void *** swig_zts_ctx;
#endif
    public:
      Director(zval *self TSRMLS_DC) : swig_self(self) {
        TSRMLS_SET_CTX(swig_zts_ctx);
      }

      static bool swig_is_overridden_method(char *cname, char *lc_fname TSRMLS_DC) {
        zend_class_entry **ce;
        zend_function *mptr;

        if (zend_lookup_class(cname, strlen(cname), &ce TSRMLS_CC) != SUCCESS) {
          return false;
        }
        if (zend_hash_find(&(*ce)->function_table, lc_fname, strlen(lc_fname) + 1, (void **) &mptr) != SUCCESS) {
          return false;
        }
        // common.scope points to the declaring class
        return strcmp(mptr->common.scope->name, cname);
      }

      template <typename Type>
      void swig_acquire_ownership(Type *vptr) const {
        if (vptr) {
          swig_owner[vptr] = new GCItem_T<Type>(vptr);
        }
      }
  };

  /* base class for director exceptions */
  class DirectorException : public std::exception {
  protected:
    std::string swig_msg;
  public:
    DirectorException(int code, const char *hdr, const char *msg TSRMLS_DC) : swig_msg(hdr) {
      if (msg[0]) {
        swig_msg += " ";
        swig_msg += msg;
      }
      SWIG_ErrorCode() = code;
      SWIG_ErrorMsg() = swig_msg.c_str();
    }

    virtual ~DirectorException() throw() {
    }

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

    static void raise(int code, const char *hdr, const char *msg TSRMLS_DC) {
      throw DirectorException(code, hdr, msg TSRMLS_CC);
    }
  };

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

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

  /* any php exception that occurs during a director method call */
  class DirectorMethodException : public DirectorException
  {
  public:
    DirectorMethodException(const char *msg TSRMLS_DC)
      : DirectorException(E_ERROR, "SWIG director method error", msg TSRMLS_CC) {
    }

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

// DirectorMethodException() is documented to be callable with no parameters
// so use a macro to insert TSRMLS_CC so any ZTS context gets passed.
#define DirectorMethodException() DirectorMethodException("" TSRMLS_CC)

#endif

/* php.i: SWIG interface file for the PHP bindings
 *
 * Copyright (C) 2004,2005,2006,2007,2008,2010,2011,2012,2014,2016,2019 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
 */

#include "../xapian-version.h"


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

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

#include <xapian.h>

#include <fstream>
#include <iostream>
#include <string>
#include <vector>

using namespace std;

// If a backend has been disabled in xapian-core (manually or automatically) we
// include a stub definition here so the bindings can still be built.
namespace Xapian {



#ifndef XAPIAN_HAS_CHERT_BACKEND
    namespace Chert {
	static Database open(const string &) {
	    throw FeatureUnavailableError("Chert backend not supported");
	}
	static WritableDatabase open(const string &, int, int = 0) {
	    throw FeatureUnavailableError("Chert 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, useconds_t = 0, useconds_t = 0) {
	    throw FeatureUnavailableError("Remote backend not supported");
	}

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

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

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

}


#include "zend_exceptions.h"
#define SWIG_exception(code, msg) do { zend_throw_exception(NULL, (char*)msg, code TSRMLS_CC); goto thrown; } while (0)


#include <typeinfo>
#include <stdexcept>


#include <typeinfo>
#include <stdexcept>


#include <string>


#include <vector>
#include <stdexcept>


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


#include <utility>


class XapianSWIGQueryItor {
    HashTable *ht;

    HashPosition i;

    zval ** item;

#ifdef ZTS
    void *** swig_zts_ctx;
#endif

    void get_current_data() {
	if (zend_hash_get_current_data_ex(ht, (void **)&item, &i) != SUCCESS) {
	    zend_hash_internal_pointer_end_ex(ht, &i);
	    ht = NULL;
	}
    }

  public:
    typedef std::random_access_iterator_tag iterator_category;
    typedef Xapian::Query value_type;
    typedef Xapian::termcount_diff difference_type;
    typedef Xapian::Query * pointer;
    typedef Xapian::Query & reference;

    XapianSWIGQueryItor()
	: ht(NULL) { }

    void begin(zval ** input TSRMLS_DC) {
	ht = Z_ARRVAL_PP(input);
	TSRMLS_SET_CTX(swig_zts_ctx);
	zend_hash_internal_pointer_reset_ex(ht, &i);
	get_current_data();
    }

    XapianSWIGQueryItor & operator++() {
	zend_hash_move_forward_ex(ht, &i);
	get_current_data();
	return *this;
    }

    Xapian::Query operator*() const {
	if ((*item)->type == IS_STRING) {
	    size_t len = Z_STRLEN_PP(item);
	    const char *p = Z_STRVAL_PP(item);
	    return Xapian::Query(string(p, len));
	}

        TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
	Xapian::Query *subq = 0;
	if (SWIG_ConvertPtr(*item, (void **)&subq,
			    SWIGTYPE_p_Xapian__Query, 0) < 0) {
	    subq = 0;
	}
	if (!subq) {
	    SWIG_PHP_Error(E_ERROR, "Expected XapianQuery object or string");
fail: // Label which SWIG_PHP_Error needs.
	    return Xapian::Query();
	}
	return *subq;
    }

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

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

    difference_type operator-(const XapianSWIGQueryItor &o) const {
	// This is a hack - the only time where this will actually get called
	// is when "this" is "end" and "o" is "begin", in which case the
        // answer is the number of elements in the HashTable, which will be in
        // o.ht.
	return zend_hash_num_elements(o.ht);
    }
};



#include <xapian/iterator.h>


/** @file php/except.i
 * @brief Custom PHP exception handling.
 */
/* Warning: This file is generated by ./generate-php-exceptions
 * - do not modify directly!
 *
 * Copyright 2006,2007,2010,2011,2012 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
 */

#include <exception>
#include <zend_exceptions.h>

static void
XapianExceptionHandler()
{
    TSRMLS_FETCH();
    string msg;
    try {
	// Rethrow so we can look at the exception if it was a Xapian::Error.
	throw;
    } catch (const Xapian::Error &e) {
        // FIXME: It would be nicer to make the exceptions PHP classes
        // corresponding to the C++ Xapian::Error class hierarchy.
	msg = e.get_description();
    } catch (const std::exception &e) {
	msg = "std::exception: ";
	msg += e.what();
    } catch (...) {
	msg = "unknown error in Xapian";
    }
    // zend_throw_exception takes a non-const char * parameter (sigh).
    char * message = const_cast<char*>(msg.c_str());
    zend_throw_exception(NULL, message, SWIG_UnknownError TSRMLS_CC);
}


/* xapian-headers.i: Getting SWIG to parse Xapian's C++ headers.
 *
 * Copyright 2004,2006,2011,2012,2013,2014,2015,2016,2019 Olly Betts
 * Copyright 2014 Assem Chelli
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

SWIGINTERN Xapian::PositionIterator const &Xapian_PositionIterator_key(Xapian::PositionIterator *self){ return *self; }
SWIGINTERN Xapian::termpos Xapian_PositionIterator_current(Xapian::PositionIterator *self){ return **self; }
SWIGINTERN bool Xapian_PositionIterator_valid(Xapian::PositionIterator *self){ return Xapian::iterator_valid(*self); }
SWIGINTERN void Xapian_PositionIterator_rewind(Xapian::PositionIterator *self){  }
SWIGINTERN bool Xapian_PositionIterator_equals(Xapian::PositionIterator const *self,Xapian::PositionIterator const &o){ return *self == o; }
SWIGINTERN Xapian::termpos Xapian_PositionIterator_get_termpos(Xapian::PositionIterator const *self){ return **self; }
SWIGINTERN void Xapian_PositionIterator_next(Xapian::PositionIterator *self){ ++(*self); }
SWIGINTERN Xapian::PostingIterator const &Xapian_PostingIterator_key(Xapian::PostingIterator *self){ return *self; }
SWIGINTERN Xapian::docid Xapian_PostingIterator_current(Xapian::PostingIterator *self){ return **self; }
SWIGINTERN bool Xapian_PostingIterator_valid(Xapian::PostingIterator *self){ return Xapian::iterator_valid(*self); }
SWIGINTERN void Xapian_PostingIterator_rewind(Xapian::PostingIterator *self){  }
SWIGINTERN bool Xapian_PostingIterator_equals(Xapian::PostingIterator const *self,Xapian::PostingIterator const &o){ return *self == o; }
SWIGINTERN Xapian::docid Xapian_PostingIterator_get_docid(Xapian::PostingIterator const *self){ return **self; }
SWIGINTERN void Xapian_PostingIterator_next(Xapian::PostingIterator *self){ ++(*self); }
SWIGINTERN Xapian::TermIterator const &Xapian_TermIterator_key(Xapian::TermIterator *self){ return *self; }
SWIGINTERN std::string Xapian_TermIterator_current(Xapian::TermIterator *self){ return **self; }
SWIGINTERN bool Xapian_TermIterator_valid(Xapian::TermIterator *self){ return Xapian::iterator_valid(*self); }
SWIGINTERN void Xapian_TermIterator_rewind(Xapian::TermIterator *self){  }
SWIGINTERN bool Xapian_TermIterator_equals(Xapian::TermIterator const *self,Xapian::TermIterator const &o){ return *self == o; }
SWIGINTERN std::string Xapian_TermIterator_get_term(Xapian::TermIterator const *self){ return **self; }
SWIGINTERN void Xapian_TermIterator_next(Xapian::TermIterator *self){ ++(*self); }
SWIGINTERN Xapian::ValueIterator const &Xapian_ValueIterator_key(Xapian::ValueIterator *self){ return *self; }
SWIGINTERN std::string Xapian_ValueIterator_current(Xapian::ValueIterator *self){ return **self; }
SWIGINTERN bool Xapian_ValueIterator_valid(Xapian::ValueIterator *self){ return Xapian::iterator_valid(*self); }
SWIGINTERN void Xapian_ValueIterator_rewind(Xapian::ValueIterator *self){  }
SWIGINTERN bool Xapian_ValueIterator_equals(Xapian::ValueIterator const *self,Xapian::ValueIterator const &o){ return *self == o; }
SWIGINTERN std::string Xapian_ValueIterator_get_value(Xapian::ValueIterator const *self){ return **self; }
SWIGINTERN void Xapian_ValueIterator_next(Xapian::ValueIterator *self){ ++(*self); }
SWIGINTERN Xapian::docid Xapian_MSet_get_docid(Xapian::MSet const *self,Xapian::doccount i){
	return *(*self)[i];
    }
SWIGINTERN Xapian::Document Xapian_MSet_get_document(Xapian::MSet const *self,Xapian::doccount i){
	return (*self)[i].get_document();
    }
SWIGINTERN Xapian::MSetIterator Xapian_MSet_get_hit(Xapian::MSet const *self,Xapian::doccount i){
	return (*self)[i];
    }
SWIGINTERN int Xapian_MSet_get_document_percentage(Xapian::MSet const *self,Xapian::doccount i){
	return self->convert_to_percent((*self)[i]);
    }
SWIGINTERN Xapian::MSetIterator const &Xapian_MSetIterator_key(Xapian::MSetIterator *self){ return *self; }
SWIGINTERN Xapian::docid Xapian_MSetIterator_current(Xapian::MSetIterator *self){ return **self; }
SWIGINTERN bool Xapian_MSetIterator_valid(Xapian::MSetIterator *self){ return Xapian::iterator_valid(*self); }
SWIGINTERN void Xapian_MSetIterator_rewind(Xapian::MSetIterator *self){ Xapian::iterator_rewind(*self); }
SWIGINTERN bool Xapian_MSetIterator_equals(Xapian::MSetIterator const *self,Xapian::MSetIterator const &o){ return *self == o; }
SWIGINTERN Xapian::docid Xapian_MSetIterator_get_docid(Xapian::MSetIterator const *self){ return **self; }
SWIGINTERN void Xapian_MSetIterator_next(Xapian::MSetIterator *self){ ++(*self); }
SWIGINTERN void Xapian_MSetIterator_prev(Xapian::MSetIterator *self){ --(*self); }
SWIGINTERN Xapian::ESetIterator const &Xapian_ESetIterator_key(Xapian::ESetIterator *self){ return *self; }
SWIGINTERN std::string Xapian_ESetIterator_current(Xapian::ESetIterator *self){ return **self; }
SWIGINTERN bool Xapian_ESetIterator_valid(Xapian::ESetIterator *self){ return Xapian::iterator_valid(*self); }
SWIGINTERN void Xapian_ESetIterator_rewind(Xapian::ESetIterator *self){ Xapian::iterator_rewind(*self); }
SWIGINTERN bool Xapian_ESetIterator_equals(Xapian::ESetIterator const *self,Xapian::ESetIterator const &o){ return *self == o; }
SWIGINTERN std::string Xapian_ESetIterator_get_term(Xapian::ESetIterator const *self){ return **self; }
SWIGINTERN void Xapian_ESetIterator_next(Xapian::ESetIterator *self){ ++(*self); }
SWIGINTERN void Xapian_ESetIterator_prev(Xapian::ESetIterator *self){ --(*self); }
SWIGINTERN std::pair< Xapian::TermIterator,Xapian::TermIterator > Xapian_Enquire_get_matching_terms(Xapian::Enquire const *self,Xapian::MSetIterator const &item){
	return std::make_pair(self->get_matching_terms_begin(item),
			      self->get_matching_terms_end(item));
    }
SWIGINTERN Xapian::SimpleStopper *new_Xapian_SimpleStopper__SWIG_2(std::string const &file){
	ifstream in_file(file.c_str());
	if (!in_file.is_open())
	    throw Xapian::InvalidArgumentError("Stopword file not found: " + file);
	istream_iterator<std::string> in_iter(in_file);
	istream_iterator<std::string> eof;
	return new Xapian::SimpleStopper(in_iter, eof);
    }
SWIGINTERN bool Xapian_LatLongCoordsIterator_equals(Xapian::LatLongCoordsIterator const *self,Xapian::LatLongCoordsIterator const &o){ return *self == o; }
SWIGINTERN Xapian::LatLongCoord Xapian_LatLongCoordsIterator_get_coord(Xapian::LatLongCoordsIterator const *self){ return **self; }
SWIGINTERN void Xapian_LatLongCoordsIterator_next(Xapian::LatLongCoordsIterator *self){ ++(*self); }

namespace Xapian {
static Xapian::valueno BAD_VALUENO_get() { return Xapian::BAD_VALUENO; }
}


/* -------- 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__GreatCircleMetricTo_p_Xapian__LatLongMetric(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LatLongMetric *)  ((Xapian::GreatCircleMetric *) x));
}
static void *_p_Xapian__ExpandDeciderFilterPrefixTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderFilterPrefix *) x));
}
static void *_p_Xapian__ExpandDeciderAndTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderAnd *) x));
}
static void *_p_Xapian__ExpandDeciderFilterTermsTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderFilterTerms *) x));
}
static void *_p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::MatchDecider *)  ((Xapian::ValueSetMatchDecider *) 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__LatLongDistanceKeyMakerTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::KeyMaker *)  ((Xapian::LatLongDistanceKeyMaker *) 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__LatLongDistancePostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::LatLongDistancePostingSource *) 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__LatLongDistancePostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::LatLongDistancePostingSource *) x));
}
static void *_p_Xapian__DPHWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::DPHWeight *) x));
}
static void *_p_Xapian__PL2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::PL2Weight *) x));
}
static void *_p_Xapian__DLHWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::DLHWeight *) x));
}
static void *_p_Xapian__BB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BB2Weight *) x));
}
static void *_p_Xapian__IneB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::IneB2Weight *) x));
}
static void *_p_Xapian__IfB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::IfB2Weight *) x));
}
static void *_p_Xapian__InL2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::InL2Weight *) x));
}
static void *_p_Xapian__TradWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::TradWeight *) x));
}
static void *_p_Xapian__TfIdfWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::TfIdfWeight *) x));
}
static void *_p_Xapian__BoolWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BoolWeight *) x));
}
static void *_p_Xapian__CoordWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::CoordWeight *) x));
}
static void *_p_Xapian__LMWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::LMWeight *) x));
}
static void *_p_Xapian__PL2PlusWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::PL2PlusWeight *) x));
}
static void *_p_Xapian__BM25PlusWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BM25PlusWeight *) x));
}
static void *_p_Xapian__BM25WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BM25Weight *) x));
}
static void *_p_Xapian__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 void *_p_Xapian__DateRangeProcessorTo_p_Xapian__RangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RangeProcessor *)  ((Xapian::DateRangeProcessor *) x));
}
static void *_p_Xapian__NumberRangeProcessorTo_p_Xapian__RangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RangeProcessor *)  ((Xapian::NumberRangeProcessor *) x));
}
static swig_type_info _swigt__int = {"_int", "int", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__BB2Weight = {"_p_Xapian__BB2Weight", "Xapian::BB2Weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__BM25PlusWeight = {"_p_Xapian__BM25PlusWeight", "Xapian::BM25PlusWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__BM25Weight = {"_p_Xapian__BM25Weight", "Xapian::BM25Weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__BoolWeight = {"_p_Xapian__BoolWeight", "Xapian::BoolWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Compactor = {"_p_Xapian__Compactor", "Xapian::Compactor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__CoordWeight = {"_p_Xapian__CoordWeight", "Xapian::CoordWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DLHWeight = {"_p_Xapian__DLHWeight", "Xapian::DLHWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DPHWeight = {"_p_Xapian__DPHWeight", "Xapian::DPHWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Database = {"_p_Xapian__Database", "Xapian::Database *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DateRangeProcessor = {"_p_Xapian__DateRangeProcessor", "Xapian::DateRangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DateValueRangeProcessor = {"_p_Xapian__DateValueRangeProcessor", "Xapian::DateValueRangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DecreasingValueWeightPostingSource = {"_p_Xapian__DecreasingValueWeightPostingSource", "Xapian::DecreasingValueWeightPostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Document = {"_p_Xapian__Document", "Xapian::Document *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ESet = {"_p_Xapian__ESet", "Xapian::ESet *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ESetIterator = {"_p_Xapian__ESetIterator", "Xapian::ESetIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Enquire = {"_p_Xapian__Enquire", "Xapian::Enquire *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ExpandDecider = {"_p_Xapian__ExpandDecider", "Xapian::ExpandDecider *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ExpandDeciderFilterTerms = {"_p_Xapian__ExpandDeciderFilterTerms", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_Xapian__ExpandDeciderAnd = {"_p_Xapian__ExpandDeciderAnd", "Xapian::ExpandDeciderAnd *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ExpandDeciderFilterPrefix = {"_p_Xapian__ExpandDeciderFilterPrefix", "Xapian::ExpandDeciderFilterPrefix *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__FieldProcessor = {"_p_Xapian__FieldProcessor", "Xapian::FieldProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__FixedWeightPostingSource = {"_p_Xapian__FixedWeightPostingSource", "Xapian::FixedWeightPostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__GreatCircleMetric = {"_p_Xapian__GreatCircleMetric", "Xapian::GreatCircleMetric *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__IfB2Weight = {"_p_Xapian__IfB2Weight", "Xapian::IfB2Weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__InL2Weight = {"_p_Xapian__InL2Weight", "Xapian::InL2Weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__IneB2Weight = {"_p_Xapian__IneB2Weight", "Xapian::IneB2Weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__KeyMaker = {"_p_Xapian__KeyMaker", "Xapian::KeyMaker *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__LMWeight = {"_p_Xapian__LMWeight", "Xapian::LMWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__LatLongCoord = {"_p_Xapian__LatLongCoord", "Xapian::LatLongCoord *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__LatLongCoords = {"_p_Xapian__LatLongCoords", "Xapian::LatLongCoords *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__LatLongCoordsIterator = {"_p_Xapian__LatLongCoordsIterator", "Xapian::LatLongCoordsIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__LatLongDistanceKeyMaker = {"_p_Xapian__LatLongDistanceKeyMaker", "Xapian::LatLongDistanceKeyMaker *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__LatLongDistancePostingSource = {"_p_Xapian__LatLongDistancePostingSource", "Xapian::LatLongDistancePostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__LatLongMetric = {"_p_Xapian__LatLongMetric", "Xapian::LatLongMetric *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MSet = {"_p_Xapian__MSet", "Xapian::MSet *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MSetIterator = {"_p_Xapian__MSetIterator", "Xapian::MSetIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MatchDecider = {"_p_Xapian__MatchDecider", "Xapian::MatchDecider *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MatchSpy = {"_p_Xapian__MatchSpy", "Xapian::MatchSpy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MultiValueKeyMaker = {"_p_Xapian__MultiValueKeyMaker", "Xapian::MultiValueKeyMaker *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__NumberRangeProcessor = {"_p_Xapian__NumberRangeProcessor", "Xapian::NumberRangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__NumberValueRangeProcessor = {"_p_Xapian__NumberValueRangeProcessor", "Xapian::NumberValueRangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__PL2PlusWeight = {"_p_Xapian__PL2PlusWeight", "Xapian::PL2PlusWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__PL2Weight = {"_p_Xapian__PL2Weight", "Xapian::PL2Weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__PositionIterator = {"_p_Xapian__PositionIterator", "Xapian::PositionIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__PostingIterator = {"_p_Xapian__PostingIterator", "Xapian::PostingIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__PostingSource = {"_p_Xapian__PostingSource", "Xapian::PostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Query = {"_p_Xapian__Query", "Xapian::Query *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__QueryParser = {"_p_Xapian__QueryParser", "Xapian::QueryParser *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__RSet = {"_p_Xapian__RSet", "Xapian::RSet *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__RangeProcessor = {"_p_Xapian__RangeProcessor", "Xapian::RangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Registry = {"_p_Xapian__Registry", "Xapian::Registry *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__SimpleStopper = {"_p_Xapian__SimpleStopper", "Xapian::SimpleStopper *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Stem = {"_p_Xapian__Stem", "Xapian::Stem *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__StemImplementation = {"_p_Xapian__StemImplementation", "Xapian::StemImplementation *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Stopper = {"_p_Xapian__Stopper", "Xapian::Stopper *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__StringValueRangeProcessor = {"_p_Xapian__StringValueRangeProcessor", "Xapian::StringValueRangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__TermGenerator = {"_p_Xapian__TermGenerator", "Xapian::TermGenerator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__TermIterator = {"_p_Xapian__TermIterator", "Xapian::TermIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__TfIdfWeight = {"_p_Xapian__TfIdfWeight", "Xapian::TfIdfWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__TradWeight = {"_p_Xapian__TradWeight", "Xapian::TradWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueCountMatchSpy = {"_p_Xapian__ValueCountMatchSpy", "Xapian::ValueCountMatchSpy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueIterator = {"_p_Xapian__ValueIterator", "Xapian::ValueIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueMapPostingSource = {"_p_Xapian__ValueMapPostingSource", "Xapian::ValueMapPostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValuePostingSource = {"_p_Xapian__ValuePostingSource", "Xapian::ValuePostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueRangeProcessor = {"_p_Xapian__ValueRangeProcessor", "Xapian::ValueRangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueSetMatchDecider = {"_p_Xapian__ValueSetMatchDecider", "Xapian::ValueSetMatchDecider *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueWeightPostingSource = {"_p_Xapian__ValueWeightPostingSource", "Xapian::ValueWeightPostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Weight = {"_p_Xapian__Weight", "Xapian::Weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__WritableDatabase = {"_p_Xapian__WritableDatabase", "Xapian::WritableDatabase *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_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_flags = {"_p_flags", "flags *", 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_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_stem_strategy = {"_p_stem_strategy", "stem_strategy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_stop_strategy = {"_p_stop_strategy", "stop_strategy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_type_smoothing = {"_p_type_smoothing", "type_smoothing *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "Xapian::timeout *|unsigned int *|Xapian::doccount *|Xapian::termcount *|Xapian::valueno *|Xapian::docid *|Xapian::termpos *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "Xapian::rev *|unsigned long *|Xapian::totallength *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__unsigned_int = {"_unsigned_int", "Xapian::valueno|unsigned int", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__int,
  &_swigt__p_Xapian__BB2Weight,
  &_swigt__p_Xapian__BM25PlusWeight,
  &_swigt__p_Xapian__BM25Weight,
  &_swigt__p_Xapian__BoolWeight,
  &_swigt__p_Xapian__Compactor,
  &_swigt__p_Xapian__CoordWeight,
  &_swigt__p_Xapian__DLHWeight,
  &_swigt__p_Xapian__DPHWeight,
  &_swigt__p_Xapian__Database,
  &_swigt__p_Xapian__DateRangeProcessor,
  &_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__ExpandDecider,
  &_swigt__p_Xapian__ExpandDeciderAnd,
  &_swigt__p_Xapian__ExpandDeciderFilterPrefix,
  &_swigt__p_Xapian__ExpandDeciderFilterTerms,
  &_swigt__p_Xapian__FieldProcessor,
  &_swigt__p_Xapian__FixedWeightPostingSource,
  &_swigt__p_Xapian__GreatCircleMetric,
  &_swigt__p_Xapian__IfB2Weight,
  &_swigt__p_Xapian__InL2Weight,
  &_swigt__p_Xapian__IneB2Weight,
  &_swigt__p_Xapian__KeyMaker,
  &_swigt__p_Xapian__LMWeight,
  &_swigt__p_Xapian__LatLongCoord,
  &_swigt__p_Xapian__LatLongCoords,
  &_swigt__p_Xapian__LatLongCoordsIterator,
  &_swigt__p_Xapian__LatLongDistanceKeyMaker,
  &_swigt__p_Xapian__LatLongDistancePostingSource,
  &_swigt__p_Xapian__LatLongMetric,
  &_swigt__p_Xapian__MSet,
  &_swigt__p_Xapian__MSetIterator,
  &_swigt__p_Xapian__MatchDecider,
  &_swigt__p_Xapian__MatchSpy,
  &_swigt__p_Xapian__MultiValueKeyMaker,
  &_swigt__p_Xapian__NumberRangeProcessor,
  &_swigt__p_Xapian__NumberValueRangeProcessor,
  &_swigt__p_Xapian__PL2PlusWeight,
  &_swigt__p_Xapian__PL2Weight,
  &_swigt__p_Xapian__PositionIterator,
  &_swigt__p_Xapian__PostingIterator,
  &_swigt__p_Xapian__PostingSource,
  &_swigt__p_Xapian__Query,
  &_swigt__p_Xapian__QueryParser,
  &_swigt__p_Xapian__RSet,
  &_swigt__p_Xapian__RangeProcessor,
  &_swigt__p_Xapian__Registry,
  &_swigt__p_Xapian__SimpleStopper,
  &_swigt__p_Xapian__Stem,
  &_swigt__p_Xapian__StemImplementation,
  &_swigt__p_Xapian__Stopper,
  &_swigt__p_Xapian__StringValueRangeProcessor,
  &_swigt__p_Xapian__TermGenerator,
  &_swigt__p_Xapian__TermIterator,
  &_swigt__p_Xapian__TfIdfWeight,
  &_swigt__p_Xapian__TradWeight,
  &_swigt__p_Xapian__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_compaction_level,
  &_swigt__p_docid_order,
  &_swigt__p_double,
  &_swigt__p_feature_flag,
  &_swigt__p_flags,
  &_swigt__p_int,
  &_swigt__p_std__string,
  &_swigt__p_stem_strategy,
  &_swigt__p_stop_strategy,
  &_swigt__p_type_smoothing,
  &_swigt__p_unsigned_int,
  &_swigt__p_unsigned_long,
  &_swigt__unsigned_int,
};

static swig_cast_info _swigc__int[] = {  {&_swigt__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__BB2Weight[] = {  {&_swigt__p_Xapian__BB2Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__BM25PlusWeight[] = {  {&_swigt__p_Xapian__BM25PlusWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__BM25Weight[] = {  {&_swigt__p_Xapian__BM25Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__BoolWeight[] = {  {&_swigt__p_Xapian__BoolWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Compactor[] = {  {&_swigt__p_Xapian__Compactor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__CoordWeight[] = {  {&_swigt__p_Xapian__CoordWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DLHWeight[] = {  {&_swigt__p_Xapian__DLHWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DPHWeight[] = {  {&_swigt__p_Xapian__DPHWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Database[] = {  {&_swigt__p_Xapian__Database, 0, 0, 0},  {&_swigt__p_Xapian__WritableDatabase, _p_Xapian__WritableDatabaseTo_p_Xapian__Database, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DateRangeProcessor[] = {  {&_swigt__p_Xapian__DateRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DateValueRangeProcessor[] = {  {&_swigt__p_Xapian__DateValueRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DecreasingValueWeightPostingSource[] = {  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__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__ExpandDeciderFilterTerms[] = {{&_swigt__p_Xapian__ExpandDeciderFilterTerms, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ExpandDecider[] = {  {&_swigt__p_Xapian__ExpandDeciderFilterPrefix, _p_Xapian__ExpandDeciderFilterPrefixTo_p_Xapian__ExpandDecider, 0, 0},  {&_swigt__p_Xapian__ExpandDecider, 0, 0, 0},  {&_swigt__p_Xapian__ExpandDeciderAnd, _p_Xapian__ExpandDeciderAndTo_p_Xapian__ExpandDecider, 0, 0},  {&_swigt__p_Xapian__ExpandDeciderFilterTerms, _p_Xapian__ExpandDeciderFilterTermsTo_p_Xapian__ExpandDecider, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ExpandDeciderAnd[] = {  {&_swigt__p_Xapian__ExpandDeciderAnd, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ExpandDeciderFilterPrefix[] = {  {&_swigt__p_Xapian__ExpandDeciderFilterPrefix, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__FieldProcessor[] = {  {&_swigt__p_Xapian__FieldProcessor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__FixedWeightPostingSource[] = {  {&_swigt__p_Xapian__FixedWeightPostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__GreatCircleMetric[] = {  {&_swigt__p_Xapian__GreatCircleMetric, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__IfB2Weight[] = {  {&_swigt__p_Xapian__IfB2Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__InL2Weight[] = {  {&_swigt__p_Xapian__InL2Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__IneB2Weight[] = {  {&_swigt__p_Xapian__IneB2Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__KeyMaker[] = {  {&_swigt__p_Xapian__KeyMaker, 0, 0, 0},  {&_swigt__p_Xapian__MultiValueKeyMaker, _p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker, 0, 0},  {&_swigt__p_Xapian__LatLongDistanceKeyMaker, _p_Xapian__LatLongDistanceKeyMakerTo_p_Xapian__KeyMaker, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LMWeight[] = {  {&_swigt__p_Xapian__LMWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongCoord[] = {  {&_swigt__p_Xapian__LatLongCoord, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongCoords[] = {  {&_swigt__p_Xapian__LatLongCoords, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongCoordsIterator[] = {  {&_swigt__p_Xapian__LatLongCoordsIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongDistanceKeyMaker[] = {  {&_swigt__p_Xapian__LatLongDistanceKeyMaker, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongDistancePostingSource[] = {  {&_swigt__p_Xapian__LatLongDistancePostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongMetric[] = {  {&_swigt__p_Xapian__LatLongMetric, 0, 0, 0},  {&_swigt__p_Xapian__GreatCircleMetric, _p_Xapian__GreatCircleMetricTo_p_Xapian__LatLongMetric, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__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__NumberRangeProcessor[] = {  {&_swigt__p_Xapian__NumberRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__NumberValueRangeProcessor[] = {  {&_swigt__p_Xapian__NumberValueRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PL2PlusWeight[] = {  {&_swigt__p_Xapian__PL2PlusWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PL2Weight[] = {  {&_swigt__p_Xapian__PL2Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PositionIterator[] = {  {&_swigt__p_Xapian__PositionIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PostingIterator[] = {  {&_swigt__p_Xapian__PostingIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PostingSource[] = {  {&_swigt__p_Xapian__PostingSource, 0, 0, 0},  {&_swigt__p_Xapian__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__LatLongDistancePostingSource, _p_Xapian__LatLongDistancePostingSourceTo_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__RangeProcessor[] = {  {&_swigt__p_Xapian__RangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__DateRangeProcessor, _p_Xapian__DateRangeProcessorTo_p_Xapian__RangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberRangeProcessor, _p_Xapian__NumberRangeProcessorTo_p_Xapian__RangeProcessor, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Registry[] = {  {&_swigt__p_Xapian__Registry, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__SimpleStopper[] = {  {&_swigt__p_Xapian__SimpleStopper, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Stem[] = {  {&_swigt__p_Xapian__Stem, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__StemImplementation[] = {  {&_swigt__p_Xapian__StemImplementation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Stopper[] = {  {&_swigt__p_Xapian__Stopper, 0, 0, 0},  {&_swigt__p_Xapian__SimpleStopper, _p_Xapian__SimpleStopperTo_p_Xapian__Stopper, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__StringValueRangeProcessor[] = {  {&_swigt__p_Xapian__StringValueRangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__TermGenerator[] = {  {&_swigt__p_Xapian__TermGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__TermIterator[] = {  {&_swigt__p_Xapian__TermIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__TfIdfWeight[] = {  {&_swigt__p_Xapian__TfIdfWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__TradWeight[] = {  {&_swigt__p_Xapian__TradWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__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},  {&_swigt__p_Xapian__LatLongDistancePostingSource, _p_Xapian__LatLongDistancePostingSourceTo_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__DPHWeight, _p_Xapian__DPHWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__PL2Weight, _p_Xapian__PL2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__DLHWeight, _p_Xapian__DLHWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BB2Weight, _p_Xapian__BB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__IneB2Weight, _p_Xapian__IneB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__IfB2Weight, _p_Xapian__IfB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__InL2Weight, _p_Xapian__InL2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TradWeight, _p_Xapian__TradWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TfIdfWeight, _p_Xapian__TfIdfWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BoolWeight, _p_Xapian__BoolWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__CoordWeight, _p_Xapian__CoordWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__LMWeight, _p_Xapian__LMWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__PL2PlusWeight, _p_Xapian__PL2PlusWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__Weight, 0, 0, 0},  {&_swigt__p_Xapian__BM25PlusWeight, _p_Xapian__BM25PlusWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BM25Weight, _p_Xapian__BM25WeightTo_p_Xapian__Weight, 0, 0},{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_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_flags[] = {  {&_swigt__p_flags, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__string[] = {  {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_stem_strategy[] = {  {&_swigt__p_stem_strategy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_stop_strategy[] = {  {&_swigt__p_stop_strategy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_type_smoothing[] = {  {&_swigt__p_type_smoothing, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__unsigned_int[] = {  {&_swigt__unsigned_int, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__int,
  _swigc__p_Xapian__BB2Weight,
  _swigc__p_Xapian__BM25PlusWeight,
  _swigc__p_Xapian__BM25Weight,
  _swigc__p_Xapian__BoolWeight,
  _swigc__p_Xapian__Compactor,
  _swigc__p_Xapian__CoordWeight,
  _swigc__p_Xapian__DLHWeight,
  _swigc__p_Xapian__DPHWeight,
  _swigc__p_Xapian__Database,
  _swigc__p_Xapian__DateRangeProcessor,
  _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__ExpandDecider,
  _swigc__p_Xapian__ExpandDeciderAnd,
  _swigc__p_Xapian__ExpandDeciderFilterPrefix,
  _swigc__p_Xapian__ExpandDeciderFilterTerms,
  _swigc__p_Xapian__FieldProcessor,
  _swigc__p_Xapian__FixedWeightPostingSource,
  _swigc__p_Xapian__GreatCircleMetric,
  _swigc__p_Xapian__IfB2Weight,
  _swigc__p_Xapian__InL2Weight,
  _swigc__p_Xapian__IneB2Weight,
  _swigc__p_Xapian__KeyMaker,
  _swigc__p_Xapian__LMWeight,
  _swigc__p_Xapian__LatLongCoord,
  _swigc__p_Xapian__LatLongCoords,
  _swigc__p_Xapian__LatLongCoordsIterator,
  _swigc__p_Xapian__LatLongDistanceKeyMaker,
  _swigc__p_Xapian__LatLongDistancePostingSource,
  _swigc__p_Xapian__LatLongMetric,
  _swigc__p_Xapian__MSet,
  _swigc__p_Xapian__MSetIterator,
  _swigc__p_Xapian__MatchDecider,
  _swigc__p_Xapian__MatchSpy,
  _swigc__p_Xapian__MultiValueKeyMaker,
  _swigc__p_Xapian__NumberRangeProcessor,
  _swigc__p_Xapian__NumberValueRangeProcessor,
  _swigc__p_Xapian__PL2PlusWeight,
  _swigc__p_Xapian__PL2Weight,
  _swigc__p_Xapian__PositionIterator,
  _swigc__p_Xapian__PostingIterator,
  _swigc__p_Xapian__PostingSource,
  _swigc__p_Xapian__Query,
  _swigc__p_Xapian__QueryParser,
  _swigc__p_Xapian__RSet,
  _swigc__p_Xapian__RangeProcessor,
  _swigc__p_Xapian__Registry,
  _swigc__p_Xapian__SimpleStopper,
  _swigc__p_Xapian__Stem,
  _swigc__p_Xapian__StemImplementation,
  _swigc__p_Xapian__Stopper,
  _swigc__p_Xapian__StringValueRangeProcessor,
  _swigc__p_Xapian__TermGenerator,
  _swigc__p_Xapian__TermIterator,
  _swigc__p_Xapian__TfIdfWeight,
  _swigc__p_Xapian__TradWeight,
  _swigc__p_Xapian__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_compaction_level,
  _swigc__p_docid_order,
  _swigc__p_double,
  _swigc__p_feature_flag,
  _swigc__p_flags,
  _swigc__p_int,
  _swigc__p_std__string,
  _swigc__p_stem_strategy,
  _swigc__p_stop_strategy,
  _swigc__p_type_smoothing,
  _swigc__p_unsigned_int,
  _swigc__p_unsigned_long,
  _swigc__unsigned_int,
};


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

/* end header section */

#include "xapian_wrap.h"

SwigDirector_StemImplementation::SwigDirector_StemImplementation(zval *self TSRMLS_DC): Xapian::StemImplementation(), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_StemImplementation::~SwigDirector_StemImplementation() {
}

std::string SwigDirector_StemImplementation::operator ()(std::string const &word) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"apply", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  ZVAL_STRINGL(&obj0, const_cast<char*>((&word)->data()), (&word)->size(), 1);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_StemImplementation::get_description() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_description", 15, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_MatchDecider::SwigDirector_MatchDecider(zval *self TSRMLS_DC): Xapian::MatchDecider(), Swig::Director(self TSRMLS_CC) {
  
}



bool SwigDirector_MatchDecider::operator ()(Xapian::Document const &doc) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  bool c_result;
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"apply", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  SWIG_SetPointerZval(&obj0, (void *)&doc, SWIGTYPE_p_Xapian__Document, (0)|2);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(&result);
  c_result = (bool) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (bool) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_MatchDecider::~SwigDirector_MatchDecider() {
}

SwigDirector_ExpandDecider::SwigDirector_ExpandDecider(zval *self TSRMLS_DC): Xapian::ExpandDecider(), Swig::Director(self TSRMLS_CC) {
  
}



bool SwigDirector_ExpandDecider::operator ()(std::string const &term) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  bool c_result;
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"apply", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  ZVAL_STRINGL(&obj0, const_cast<char*>((&term)->data()), (&term)->size(), 1);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(&result);
  c_result = (bool) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (bool) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_ExpandDecider::~SwigDirector_ExpandDecider() {
}

SwigDirector_KeyMaker::SwigDirector_KeyMaker(zval *self TSRMLS_DC): Xapian::KeyMaker(), Swig::Director(self TSRMLS_CC) {
  
}



std::string SwigDirector_KeyMaker::operator ()(Xapian::Document const &doc) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"apply", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  SWIG_SetPointerZval(&obj0, (void *)&doc, SWIGTYPE_p_Xapian__Document, (0)|2);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_KeyMaker::~SwigDirector_KeyMaker() {
}

SwigDirector_Stopper::SwigDirector_Stopper(zval *self TSRMLS_DC): Xapian::Stopper(), Swig::Director(self TSRMLS_CC) {
  
}



bool SwigDirector_Stopper::operator ()(std::string const &term) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  bool c_result;
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"apply", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  ZVAL_STRINGL(&obj0, const_cast<char*>((&term)->data()), (&term)->size(), 1);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(&result);
  c_result = (bool) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (bool) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_Stopper::~SwigDirector_Stopper() {
}

std::string SwigDirector_Stopper::get_description() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_description", 15, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_RangeProcessor::SwigDirector_RangeProcessor(zval *self TSRMLS_DC): Xapian::RangeProcessor(), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_RangeProcessor::SwigDirector_RangeProcessor(zval *self TSRMLS_DC, Xapian::valueno slot_, std::string const &str_, unsigned int flags_): Xapian::RangeProcessor(slot_, str_, flags_), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_RangeProcessor::~SwigDirector_RangeProcessor() {
}

Xapian::Query SwigDirector_RangeProcessor::operator ()(std::string const &begin, std::string const &end) {
  Xapian::Query *tmp ;
  
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::Query c_result;
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"apply", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  ZVAL_STRINGL(&obj0, const_cast<char*>((&begin)->data()), (&begin)->size(), 1);
  
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  
  ZVAL_STRINGL(&obj1, const_cast<char*>((&end)->data()), (&end)->size(), 1);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  {
    /* If exit was via exception, PHP NULL is returned so skip the conversion. */
    if (!EG(exception)) {
      if(SWIG_ConvertPtr(result, (void **) &tmp, SWIGTYPE_p_Xapian__Query, 0) < 0 || tmp == NULL)
      SWIG_PHP_Error(E_ERROR, "Type error in argument 0 of apply. Expected SWIGTYPE_p_Xapian__Query");
      c_result = *tmp;
    }
  }
  FREE_ZVAL(result);
thrown:
  return (Xapian::Query) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_ValueRangeProcessor::SwigDirector_ValueRangeProcessor(zval *self TSRMLS_DC): Xapian::ValueRangeProcessor(), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_ValueRangeProcessor::~SwigDirector_ValueRangeProcessor() {
}

Xapian::valueno SwigDirector_ValueRangeProcessor::operator ()(std::string &begin, std::string &end) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::valueno c_result;
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"apply", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  SWIG_SetPointerZval(&obj0, (void *)&begin, SWIGTYPE_p_std__string, (0)|2);
  
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  
  SWIG_SetPointerZval(&obj1, (void *)&end, SWIGTYPE_p_std__string, (0)|2);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::valueno) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::valueno) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_FieldProcessor::SwigDirector_FieldProcessor(zval *self TSRMLS_DC): Xapian::FieldProcessor(), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_FieldProcessor::~SwigDirector_FieldProcessor() {
}

Xapian::Query SwigDirector_FieldProcessor::operator ()(std::string const &str) {
  Xapian::Query *tmp ;
  
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::Query c_result;
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"apply", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  ZVAL_STRINGL(&obj0, const_cast<char*>((&str)->data()), (&str)->size(), 1);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  {
    /* If exit was via exception, PHP NULL is returned so skip the conversion. */
    if (!EG(exception)) {
      if(SWIG_ConvertPtr(result, (void **) &tmp, SWIGTYPE_p_Xapian__Query, 0) < 0 || tmp == NULL)
      SWIG_PHP_Error(E_ERROR, "Type error in argument 0 of apply. Expected SWIGTYPE_p_Xapian__Query");
      c_result = *tmp;
    }
  }
  FREE_ZVAL(result);
thrown:
  return (Xapian::Query) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_Compactor::SwigDirector_Compactor(zval *self TSRMLS_DC): Xapian::Compactor(), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_Compactor::~SwigDirector_Compactor() {
}

void SwigDirector_Compactor::set_status(std::string const &table, std::string const &status) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"set_status", 10, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  ZVAL_STRINGL(&obj0, const_cast<char*>((&table)->data()), (&table)->size(), 1);
  
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  
  ZVAL_STRINGL(&obj1, const_cast<char*>((&status)->data()), (&status)->size(), 1);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_Compactor::resolve_duplicate_metadata(std::string const &key, size_t num_tags, std::string const tags[]) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"resolve_duplicate_metadata", 26, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  ZVAL_STRINGL(&obj0, const_cast<char*>((&key)->data()), (&key)->size(), 1);
  
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  {
    if (array_init(&obj1) == FAILURE) {
      SWIG_PHP_Error(E_ERROR, "array_init failed");
    }
    
    for (size_t i = 0; i != num_tags; ++i) {
      const string & term = tags[i];
      char *p = const_cast<char*>(term.data());
      add_next_index_stringl(&obj1, p, term.length(), 1);
    }
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_PostingSource::SwigDirector_PostingSource(zval *self TSRMLS_DC): Xapian::PostingSource(), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_PostingSource::~SwigDirector_PostingSource() {
}

Xapian::doccount SwigDirector_PostingSource::get_termfreq_min() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::doccount c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_termfreq_min", 16, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::doccount) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::doccount) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::doccount SwigDirector_PostingSource::get_termfreq_est() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::doccount c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_termfreq_est", 16, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::doccount) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::doccount) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::doccount SwigDirector_PostingSource::get_termfreq_max() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::doccount c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_termfreq_max", 16, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::doccount) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::doccount) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


double SwigDirector_PostingSource::get_weight() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  double c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_weight", 10, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(&result);
  c_result = (double) Z_DVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (double) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::docid SwigDirector_PostingSource::get_docid() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::docid c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_docid", 9, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::docid) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::docid) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


void SwigDirector_PostingSource::next(double min_wt) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"next", 4, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  {
    ZVAL_DOUBLE(&obj0,min_wt);
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


void SwigDirector_PostingSource::skip_to(Xapian::docid did, double min_wt) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"skip_to", 7, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  {
    ZVAL_LONG(&obj0,did);
  }
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  {
    ZVAL_DOUBLE(&obj1,min_wt);
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


bool SwigDirector_PostingSource::check(Xapian::docid did, double min_wt) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  bool c_result;
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"check", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  {
    ZVAL_LONG(&obj0,did);
  }
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  {
    ZVAL_DOUBLE(&obj1,min_wt);
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(&result);
  c_result = (bool) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (bool) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


bool SwigDirector_PostingSource::at_end() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  bool c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"at_end", 6, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(&result);
  c_result = (bool) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (bool) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::PostingSource *SwigDirector_PostingSource::clone() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::PostingSource::clone();
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_PostingSource::name() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"name", 4, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_PostingSource::serialise() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::PostingSource::serialise();
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::PostingSource *SwigDirector_PostingSource::unserialise(std::string const &serialised) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::PostingSource::unserialise(serialised);
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::PostingSource *SwigDirector_PostingSource::unserialise_with_registry(std::string const &serialised, Xapian::Registry const &registry) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::PostingSource::unserialise_with_registry(serialised,registry);
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


void SwigDirector_PostingSource::init(Xapian::Database const &db) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"init", 4, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  SWIG_SetPointerZval(&obj0, (void *)&db, SWIGTYPE_p_Xapian__Database, (0)|2);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_PostingSource::get_description() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_description", 15, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_ValuePostingSource::SwigDirector_ValuePostingSource(zval *self TSRMLS_DC, Xapian::valueno slot_): Xapian::ValuePostingSource(slot_), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_ValuePostingSource::~SwigDirector_ValuePostingSource() {
}

Xapian::doccount SwigDirector_ValuePostingSource::get_termfreq_min() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::doccount c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_termfreq_min", 16, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::doccount) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::doccount) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::doccount SwigDirector_ValuePostingSource::get_termfreq_est() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::doccount c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_termfreq_est", 16, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::doccount) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::doccount) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::doccount SwigDirector_ValuePostingSource::get_termfreq_max() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::doccount c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_termfreq_max", 16, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::doccount) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::doccount) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


double SwigDirector_ValuePostingSource::get_weight() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  double c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_weight", 10, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(&result);
  c_result = (double) Z_DVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (double) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::docid SwigDirector_ValuePostingSource::get_docid() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::docid c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_docid", 9, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::docid) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::docid) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


void SwigDirector_ValuePostingSource::next(double min_wt) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"next", 4, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  {
    ZVAL_DOUBLE(&obj0,min_wt);
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


void SwigDirector_ValuePostingSource::skip_to(Xapian::docid min_docid, double min_wt) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"skip_to", 7, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  {
    ZVAL_LONG(&obj0,min_docid);
  }
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  {
    ZVAL_DOUBLE(&obj1,min_wt);
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


bool SwigDirector_ValuePostingSource::check(Xapian::docid min_docid, double min_wt) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  bool c_result;
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"check", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  {
    ZVAL_LONG(&obj0,min_docid);
  }
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  {
    ZVAL_DOUBLE(&obj1,min_wt);
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(&result);
  c_result = (bool) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (bool) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


bool SwigDirector_ValuePostingSource::at_end() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  bool c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"at_end", 6, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(&result);
  c_result = (bool) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (bool) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::PostingSource *SwigDirector_ValuePostingSource::clone() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::PostingSource::clone();
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_ValuePostingSource::name() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"name", 4, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_ValuePostingSource::serialise() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::PostingSource::serialise();
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::PostingSource *SwigDirector_ValuePostingSource::unserialise(std::string const &serialised) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::PostingSource::unserialise(serialised);
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::PostingSource *SwigDirector_ValuePostingSource::unserialise_with_registry(std::string const &serialised, Xapian::Registry const &registry) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::PostingSource::unserialise_with_registry(serialised,registry);
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


void SwigDirector_ValuePostingSource::init(Xapian::Database const &db_) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"init", 4, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  SWIG_SetPointerZval(&obj0, (void *)&db_, SWIGTYPE_p_Xapian__Database, (0)|2);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_ValuePostingSource::get_description() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_description", 15, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_ValueWeightPostingSource::SwigDirector_ValueWeightPostingSource(zval *self TSRMLS_DC, Xapian::valueno slot_): Xapian::ValueWeightPostingSource(slot_), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_ValueWeightPostingSource::~SwigDirector_ValueWeightPostingSource() {
}

Xapian::doccount SwigDirector_ValueWeightPostingSource::get_termfreq_min() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::doccount c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_termfreq_min", 16, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::doccount) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::doccount) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::doccount SwigDirector_ValueWeightPostingSource::get_termfreq_est() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::doccount c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_termfreq_est", 16, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::doccount) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::doccount) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::doccount SwigDirector_ValueWeightPostingSource::get_termfreq_max() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::doccount c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_termfreq_max", 16, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::doccount) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::doccount) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


double SwigDirector_ValueWeightPostingSource::get_weight() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  double c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_weight", 10, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(&result);
  c_result = (double) Z_DVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (double) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::docid SwigDirector_ValueWeightPostingSource::get_docid() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::docid c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_docid", 9, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(&result);
  c_result = (Xapian::docid) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (Xapian::docid) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


void SwigDirector_ValueWeightPostingSource::next(double min_wt) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"next", 4, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  {
    ZVAL_DOUBLE(&obj0,min_wt);
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


void SwigDirector_ValueWeightPostingSource::skip_to(Xapian::docid min_docid, double min_wt) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"skip_to", 7, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  {
    ZVAL_LONG(&obj0,min_docid);
  }
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  {
    ZVAL_DOUBLE(&obj1,min_wt);
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


bool SwigDirector_ValueWeightPostingSource::check(Xapian::docid min_docid, double min_wt) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  bool c_result;
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"check", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  {
    ZVAL_LONG(&obj0,min_docid);
  }
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  {
    ZVAL_DOUBLE(&obj1,min_wt);
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(&result);
  c_result = (bool) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (bool) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


bool SwigDirector_ValueWeightPostingSource::at_end() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  bool c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"at_end", 6, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(&result);
  c_result = (bool) Z_LVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (bool) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::ValueWeightPostingSource *SwigDirector_ValueWeightPostingSource::clone() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::ValueWeightPostingSource::clone();
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_ValueWeightPostingSource::name() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"name", 4, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_ValueWeightPostingSource::serialise() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::ValueWeightPostingSource::serialise();
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::ValueWeightPostingSource *SwigDirector_ValueWeightPostingSource::unserialise(std::string const &serialised) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::ValueWeightPostingSource::unserialise(serialised);
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::PostingSource *SwigDirector_ValueWeightPostingSource::unserialise_with_registry(std::string const &serialised, Xapian::Registry const &registry) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::PostingSource::unserialise_with_registry(serialised,registry);
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


void SwigDirector_ValueWeightPostingSource::init(Xapian::Database const &db_) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"init", 4, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  SWIG_SetPointerZval(&obj0, (void *)&db_, SWIGTYPE_p_Xapian__Database, (0)|2);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_ValueWeightPostingSource::get_description() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_description", 15, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_MatchSpy::SwigDirector_MatchSpy(zval *self TSRMLS_DC): Xapian::MatchSpy(), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_MatchSpy::~SwigDirector_MatchSpy() {
}

void SwigDirector_MatchSpy::operator ()(Xapian::Document const &doc, double wt) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"apply", 5, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  SWIG_SetPointerZval(&obj0, (void *)&doc, SWIGTYPE_p_Xapian__Document, (0)|2);
  
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  {
    ZVAL_DOUBLE(&obj1,wt);
  }
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::MatchSpy *SwigDirector_MatchSpy::clone() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::MatchSpy::clone();
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_MatchSpy::name() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"name", 4, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_MatchSpy::serialise() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::MatchSpy::serialise();
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::MatchSpy *SwigDirector_MatchSpy::unserialise(std::string const &serialised, Xapian::Registry const &context) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::MatchSpy::unserialise(serialised,context);
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_MatchSpy::serialise_results() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  return Xapian::MatchSpy::serialise_results();
thrown:
fail:
  SWIG_FAIL(TSRMLS_C);
}


void SwigDirector_MatchSpy::merge_results(std::string const &serialised) {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  zval *args[1];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"merge_results", 13, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  ZVAL_STRINGL(&obj0, const_cast<char*>((&serialised)->data()), (&serialised)->size(), 1);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 1, args TSRMLS_CC);
  FREE_ZVAL(result);
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_MatchSpy::get_description() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"get_description", 15, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


SwigDirector_LatLongMetric::SwigDirector_LatLongMetric(zval *self TSRMLS_DC): Xapian::LatLongMetric(), Swig::Director(self TSRMLS_CC) {
  
}



SwigDirector_LatLongMetric::~SwigDirector_LatLongMetric() {
}

double SwigDirector_LatLongMetric::pointwise_distance(Xapian::LatLongCoord const &a, Xapian::LatLongCoord const &b) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  double c_result;
  zval *args[2];
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"pointwise_distance", 18, 0);
  zval obj0;
  args[0] = &obj0;
  INIT_ZVAL(obj0);
  
  SWIG_SetPointerZval(&obj0, (void *)&a, SWIGTYPE_p_Xapian__LatLongCoord, (0)|2);
  
  zval obj1;
  args[1] = &obj1;
  INIT_ZVAL(obj1);
  
  SWIG_SetPointerZval(&obj1, (void *)&b, SWIGTYPE_p_Xapian__LatLongCoord, (0)|2);
  
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 2, args TSRMLS_CC);
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(&result);
  c_result = (double) Z_DVAL_PP(&result);
  /*@SWIG@*/;
  
  FREE_ZVAL(result);
thrown:
  return (double) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::LatLongMetric *SwigDirector_LatLongMetric::clone() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::LatLongMetric *c_result;
  Swig::DirectorPureVirtualException::raise("Attempted to invoke pure virtual method Xapian::LatLongMetric::clone" TSRMLS_CC);
thrown:
  return (Xapian::LatLongMetric *) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_LatLongMetric::name() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  zval **args = NULL;
  zval *result, funcname;
  if (!swig_self) {
    SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  }
  
  MAKE_STD_ZVAL(result);
  ZVAL_STRINGL(&funcname, (char *)"name", 4, 0);
  call_user_function(EG(function_table), (zval**)&swig_self, &funcname, result, 0, args TSRMLS_CC);
  
  convert_to_string_ex(&result);
  c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
  
  FREE_ZVAL(result);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


std::string SwigDirector_LatLongMetric::serialise() const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  std::string c_result;
  Swig::DirectorPureVirtualException::raise("Attempted to invoke pure virtual method Xapian::LatLongMetric::serialise" TSRMLS_CC);
thrown:
  return (std::string) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


Xapian::LatLongMetric *SwigDirector_LatLongMetric::unserialise(std::string const &serialised) const {
  TSRMLS_FETCH_FROM_CTX(swig_zts_ctx);
  Xapian::LatLongMetric *c_result;
  Swig::DirectorPureVirtualException::raise("Attempted to invoke pure virtual method Xapian::LatLongMetric::unserialise" TSRMLS_CC);
thrown:
  return (Xapian::LatLongMetric *) c_result;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* vdecl subsection */
static int le_swig__p_Xapian__ESetIterator=0; /* handle for ESetIterator */
static int le_swig__p_Xapian__MSetIterator=0; /* handle for MSetIterator */
static int le_swig__p_Xapian__PositionIterator=0; /* handle for PositionIterator */
static int le_swig__p_Xapian__PostingIterator=0; /* handle for PostingIterator */
static int le_swig__p_Xapian__TermIterator=0; /* handle for TermIterator */
static int le_swig__p_Xapian__ValueIterator=0; /* handle for ValueIterator */
static int le_swig__p_Xapian__TermGenerator=0; /* handle for TermGenerator */
static int le_swig__p_Xapian__Document=0; /* handle for Document */
static int le_swig__p_Xapian__LatLongCoordsIterator=0; /* handle for LatLongCoordsIterator */
static int le_swig__p_Xapian__StemImplementation=0; /* handle for StemImplementation */
static int le_swig__p_Xapian__Registry=0; /* handle for Registry */
static int le_swig__p_Xapian__Database=0; /* handle for Database */
static int le_swig__p_Xapian__WritableDatabase=0; /* handle for WritableDatabase */
static int le_swig__p_Xapian__LatLongMetric=0; /* handle for LatLongMetric */
static int le_swig__p_Xapian__GreatCircleMetric=0; /* handle for GreatCircleMetric */
static int le_swig__p_Xapian__Compactor=0; /* handle for Compactor */
static int le_swig__p_Xapian__LMWeight=0; /* handle for LMWeight */
static int le_swig__p_Xapian__PL2PlusWeight=0; /* handle for PL2PlusWeight */
static int le_swig__p_Xapian__BM25PlusWeight=0; /* handle for BM25PlusWeight */
static int le_swig__p_Xapian__BM25Weight=0; /* handle for BM25Weight */
static int le_swig__p_Xapian__Weight=0; /* handle for Weight */
static int le_swig__p_Xapian__ValueSetMatchDecider=0; /* handle for ValueSetMatchDecider */
static int le_swig__p_Xapian__MatchDecider=0; /* handle for MatchDecider */
static int le_swig__p_Xapian__ExpandDecider=0; /* handle for ExpandDecider */
static int le_swig__p_Xapian__LatLongCoord=0; /* handle for LatLongCoord */
static int le_swig__p_Xapian__Enquire=0; /* handle for Enquire */
static int le_swig__p_Xapian__ESet=0; /* handle for ESet */
static int le_swig__p_feature_flag=0; /* handle for _p_feature_flag */
static int le_swig__p_Xapian__Query=0; /* handle for Query */
static int le_swig__p_Xapian__MultiValueKeyMaker=0; /* handle for MultiValueKeyMaker */
static int le_swig__p_Xapian__KeyMaker=0; /* handle for KeyMaker */
static int le_swig__p_Xapian__LatLongDistanceKeyMaker=0; /* handle for LatLongDistanceKeyMaker */
static int le_swig__p_double=0; /* handle for _p_double */
static int le_swig__p_int=0; /* handle for _p_int */
static int le_swig__p_compaction_level=0; /* handle for _p_compaction_level */
static int le_swig__p_type_smoothing=0; /* handle for _p_type_smoothing */
static int le_swig__p_Xapian__RSet=0; /* handle for RSet */
static int le_swig__p_Xapian__ValueMapPostingSource=0; /* handle for ValueMapPostingSource */
static int le_swig__p_Xapian__DecreasingValueWeightPostingSource=0; /* handle for DecreasingValueWeightPostingSource */
static int le_swig__p_Xapian__ValueWeightPostingSource=0; /* handle for ValueWeightPostingSource */
static int le_swig__p_Xapian__ValuePostingSource=0; /* handle for ValuePostingSource */
static int le_swig__p_Xapian__PostingSource=0; /* handle for PostingSource */
static int le_swig__p_Xapian__CoordWeight=0; /* handle for CoordWeight */
static int le_swig__p_Xapian__DPHWeight=0; /* handle for DPHWeight */
static int le_swig__p_Xapian__PL2Weight=0; /* handle for PL2Weight */
static int le_swig__p_Xapian__DLHWeight=0; /* handle for DLHWeight */
static int le_swig__p_Xapian__BB2Weight=0; /* handle for BB2Weight */
static int le_swig__p_Xapian__IneB2Weight=0; /* handle for IneB2Weight */
static int le_swig__p_Xapian__IfB2Weight=0; /* handle for IfB2Weight */
static int le_swig__p_Xapian__InL2Weight=0; /* handle for InL2Weight */
static int le_swig__p_Xapian__TradWeight=0; /* handle for TradWeight */
static int le_swig__p_Xapian__TfIdfWeight=0; /* handle for TfIdfWeight */
static int le_swig__p_Xapian__BoolWeight=0; /* handle for BoolWeight */
static int le_swig__p_Xapian__FixedWeightPostingSource=0; /* handle for FixedWeightPostingSource */
static int le_swig__p_Xapian__LatLongDistancePostingSource=0; /* handle for LatLongDistancePostingSource */
static int le_swig__p_Xapian__MSet=0; /* handle for MSet */
static int le_swig__p_Xapian__QueryParser=0; /* handle for QueryParser */
static int le_swig__p_Xapian__MatchSpy=0; /* handle for MatchSpy */
static int le_swig__p_Xapian__SimpleStopper=0; /* handle for SimpleStopper */
static int le_swig__p_Xapian__Stopper=0; /* handle for Stopper */
static int le_swig__p_Xapian__ValueCountMatchSpy=0; /* handle for ValueCountMatchSpy */
static int le_swig__int=0; /* handle for _int */
static int le_swig__p_docid_order=0; /* handle for _p_docid_order */
static int le_swig__p_Xapian__FieldProcessor=0; /* handle for FieldProcessor */
static int le_swig__p_Xapian__NumberValueRangeProcessor=0; /* handle for NumberValueRangeProcessor */
static int le_swig__p_Xapian__DateValueRangeProcessor=0; /* handle for DateValueRangeProcessor */
static int le_swig__p_Xapian__NumberRangeProcessor=0; /* handle for NumberRangeProcessor */
static int le_swig__p_Xapian__DateRangeProcessor=0; /* handle for DateRangeProcessor */
static int le_swig__p_Xapian__StringValueRangeProcessor=0; /* handle for StringValueRangeProcessor */
static int le_swig__p_Xapian__ValueRangeProcessor=0; /* handle for ValueRangeProcessor */
static int le_swig__p_Xapian__RangeProcessor=0; /* handle for RangeProcessor */
static int le_swig__p_Xapian__ExpandDeciderFilterPrefix=0; /* handle for ExpandDeciderFilterPrefix */
static int le_swig__p_stem_strategy=0; /* handle for _p_stem_strategy */
static int le_swig__p_stop_strategy=0; /* handle for _p_stop_strategy */
static int le_swig__p_unsigned_long=0; /* handle for _p_unsigned_long */
static int le_swig__p_std__string=0; /* handle for _p_std__string */
static int le_swig__p_Xapian__Stem=0; /* handle for Stem */
static int le_swig__unsigned_int=0; /* handle for _unsigned_int */
static int le_swig__p_unsigned_int=0; /* handle for _p_unsigned_int */
static int le_swig__p_flags=0; /* handle for _p_flags */
static int le_swig__p_Xapian__ExpandDeciderAnd=0; /* handle for ExpandDeciderAnd */
static int le_swig__p_Xapian__LatLongCoords=0; /* handle for LatLongCoords */
/* end vdecl subsection */
/* wrapper section */
ZEND_NAMED_FUNCTION(_wrap_version_string) {
  char *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (char *)Xapian::version_string();
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_major_version) {
  int result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (int)Xapian::major_version();
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_minor_version) {
  int result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (int)Xapian::minor_version();
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_revision) {
  int result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (int)Xapian::revision();
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_PositionIterator) {
  Xapian::PositionIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::PositionIterator *)new Xapian::PositionIterator();
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PositionIterator, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_PositionIterator(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::PositionIterator *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__PositionIterator TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::PositionIterator resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PositionIterator_skip_to) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::termpos arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PositionIterator_skip_to. Expected SWIGTYPE_p_Xapian__PositionIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termpos) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PositionIterator_get_description) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PositionIterator_get_description. Expected SWIGTYPE_p_Xapian__PositionIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::PositionIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PositionIterator_key) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  zval **args[1];
  Xapian::PositionIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PositionIterator_key. Expected SWIGTYPE_p_Xapian__PositionIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::PositionIterator *) &Xapian_PositionIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PositionIterator, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PositionIterator_current) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  zval **args[1];
  Xapian::termpos result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PositionIterator_current. Expected SWIGTYPE_p_Xapian__PositionIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::termpos)Xapian_PositionIterator_current(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PositionIterator_valid) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PositionIterator_valid. Expected SWIGTYPE_p_Xapian__PositionIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)Xapian_PositionIterator_valid(arg1);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PositionIterator_rewind) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PositionIterator_rewind. Expected SWIGTYPE_p_Xapian__PositionIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  Xapian_PositionIterator_rewind(arg1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PositionIterator_equals) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::PositionIterator *arg2 = 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PositionIterator_equals. Expected SWIGTYPE_p_Xapian__PositionIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of PositionIterator_equals. Expected SWIGTYPE_p_Xapian__PositionIterator");
    }
  }
  {
    try {
      result = (bool)Xapian_PositionIterator_equals((Xapian::PositionIterator const *)arg1,(Xapian::PositionIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PositionIterator_get_termpos) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  zval **args[1];
  Xapian::termpos result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PositionIterator_get_termpos. Expected SWIGTYPE_p_Xapian__PositionIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termpos)Xapian_PositionIterator_get_termpos((Xapian::PositionIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PositionIterator_next) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PositionIterator_next. Expected SWIGTYPE_p_Xapian__PositionIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      Xapian_PositionIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_PostingIterator) {
  Xapian::PostingIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::PostingIterator *)new Xapian::PostingIterator();
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PostingIterator, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_PostingIterator(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::PostingIterator *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__PostingIterator TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::PostingIterator resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_get_wdf) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_get_wdf. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_wdf();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_get_doclength) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_get_doclength. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_doclength();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_get_unique_terms) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_get_unique_terms. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_unique_terms();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_positionlist_begin) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  Xapian::PositionIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_positionlist_begin. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::PostingIterator const *)arg1)->positionlist_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator((const Xapian::PositionIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_positionlist_end) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  Xapian::PositionIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_positionlist_end. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::PostingIterator const *)arg1)->positionlist_end();
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator((const Xapian::PositionIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_skip_to) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_skip_to. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_get_description) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_get_description. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::PostingIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_key) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  Xapian::PostingIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_key. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::PostingIterator *) &Xapian_PostingIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PostingIterator, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_current) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_current. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::docid)Xapian_PostingIterator_current(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_valid) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_valid. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)Xapian_PostingIterator_valid(arg1);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_rewind) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_rewind. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  Xapian_PostingIterator_rewind(arg1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_equals) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PostingIterator *arg2 = 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_equals. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of PostingIterator_equals. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  {
    try {
      result = (bool)Xapian_PostingIterator_equals((Xapian::PostingIterator const *)arg1,(Xapian::PostingIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_get_docid) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_get_docid. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::docid)Xapian_PostingIterator_get_docid((Xapian::PostingIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingIterator_next) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingIterator_next. Expected SWIGTYPE_p_Xapian__PostingIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      Xapian_PostingIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_TermIterator) {
  Xapian::TermIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::TermIterator *)new Xapian::TermIterator();
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__TermIterator, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_TermIterator(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::TermIterator *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__TermIterator TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::TermIterator resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_get_wdf) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_get_wdf. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->get_wdf();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_get_termfreq) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_get_termfreq. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::TermIterator const *)arg1)->get_termfreq();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_positionlist_count) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_positionlist_count. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->positionlist_count();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_positionlist_begin) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  Xapian::PositionIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_positionlist_begin. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::TermIterator const *)arg1)->positionlist_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator((const Xapian::PositionIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_positionlist_end) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  Xapian::PositionIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_positionlist_end. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::TermIterator const *)arg1)->positionlist_end();
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator((const Xapian::PositionIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_skip_to) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_skip_to. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->skip_to((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_get_description) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_get_description. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::TermIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_key) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  Xapian::TermIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_key. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::TermIterator *) &Xapian_TermIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__TermIterator, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_current) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_current. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = Xapian_TermIterator_current(arg1);
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_valid) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_valid. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)Xapian_TermIterator_valid(arg1);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_rewind) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_rewind. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  Xapian_TermIterator_rewind(arg1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_equals) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::TermIterator *arg2 = 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_equals. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__TermIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of TermIterator_equals. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  {
    try {
      result = (bool)Xapian_TermIterator_equals((Xapian::TermIterator const *)arg1,(Xapian::TermIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_get_term) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_get_term. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = Xapian_TermIterator_get_term((Xapian::TermIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermIterator_next) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermIterator_next. Expected SWIGTYPE_p_Xapian__TermIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      Xapian_TermIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ValueIterator) {
  Xapian::ValueIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::ValueIterator *)new Xapian::ValueIterator();
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueIterator, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ValueIterator(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ValueIterator *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ValueIterator TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ValueIterator resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_get_docid) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  zval **args[1];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_get_docid. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::docid)((Xapian::ValueIterator const *)arg1)->get_docid();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_get_valueno) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  zval **args[1];
  Xapian::valueno result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_get_valueno. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::valueno)((Xapian::ValueIterator const *)arg1)->get_valueno();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_skip_to) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_skip_to. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_check) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_check. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (bool)(arg1)->check(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_get_description) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_get_description. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ValueIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_key) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  zval **args[1];
  Xapian::ValueIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_key. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::ValueIterator *) &Xapian_ValueIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueIterator, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_current) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_current. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = Xapian_ValueIterator_current(arg1);
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_valid) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_valid. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)Xapian_ValueIterator_valid(arg1);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_rewind) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_rewind. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  Xapian_ValueIterator_rewind(arg1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_equals) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::ValueIterator *arg2 = 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_equals. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of ValueIterator_equals. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  {
    try {
      result = (bool)Xapian_ValueIterator_equals((Xapian::ValueIterator const *)arg1,(Xapian::ValueIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_get_value) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_get_value. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = Xapian_ValueIterator_get_value((Xapian::ValueIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueIterator_next) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueIterator_next. Expected SWIGTYPE_p_Xapian__ValueIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      Xapian_ValueIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Document) {
  Xapian::Document *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::Document *)new Xapian::Document();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Document, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Document(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::Document *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__Document TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::Document resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_get_value) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  zval **args[2];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_get_value. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_value(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_add_value) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  std::string *arg3 = 0 ;
  std::string temp3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_add_value. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      (arg1)->add_value(arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_remove_value) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_remove_value. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->remove_value(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_clear_values) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_clear_values. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->clear_values();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_get_data) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_get_data. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_data();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_set_data) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_set_data. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->set_data((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_add_posting__SWIG_0) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termpos arg3 ;
  Xapian::termcount arg4 ;
  std::string temp2 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_add_posting. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termpos) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_posting((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_add_posting__SWIG_1) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termpos arg3 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_add_posting. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termpos) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_posting((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_add_posting) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Document, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_Document_add_posting__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Document, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_Document_add_posting__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Document_add_posting'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_add_term__SWIG_0) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_add_term. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_term((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_add_term__SWIG_1) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_add_term. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->add_term((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_add_term) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Document, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_Document_add_term__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Document, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_Document_add_term__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Document_add_term'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_add_boolean_term) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_add_boolean_term. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->add_boolean_term((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_remove_posting__SWIG_0) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termpos arg3 ;
  Xapian::termcount arg4 ;
  std::string temp2 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_remove_posting. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termpos) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->remove_posting((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_remove_posting__SWIG_1) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termpos arg3 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_remove_posting. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termpos) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->remove_posting((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_remove_posting) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Document, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_Document_remove_posting__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Document, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_Document_remove_posting__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Document_remove_posting'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_remove_postings__SWIG_0) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termpos arg3 ;
  Xapian::termpos arg4 ;
  Xapian::termcount arg5 ;
  std::string temp2 ;
  zval **args[5];
  Xapian::termpos result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_remove_postings. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termpos) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termpos) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[4]);
  arg5 = (Xapian::termcount) Z_LVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::termpos)(arg1)->remove_postings((std::string const &)*arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_remove_postings__SWIG_1) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termpos arg3 ;
  Xapian::termpos arg4 ;
  std::string temp2 ;
  zval **args[4];
  Xapian::termpos result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_remove_postings. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termpos) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termpos) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::termpos)(arg1)->remove_postings((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_remove_postings) {
  int argc;
  zval **argv[5];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Document, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_Document_remove_postings__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Document, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_LONG); 
            if (_v) {
              _wrap_Document_remove_postings__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Document_remove_postings'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_remove_term) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_remove_term. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->remove_term((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_clear_terms) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_clear_terms. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->clear_terms();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_termlist_count) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_termlist_count. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termcount)((Xapian::Document const *)arg1)->termlist_count();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_termlist_begin) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_termlist_begin. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Document const *)arg1)->termlist_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_termlist_end) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_termlist_end. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::Document const *)arg1)->termlist_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_values_count) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_values_count. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termcount)((Xapian::Document const *)arg1)->values_count();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_values_begin) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  Xapian::ValueIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_values_begin. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Document const *)arg1)->values_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ValueIterator * resultobj = new Xapian::ValueIterator((const Xapian::ValueIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ValueIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_values_end) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  Xapian::ValueIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_values_end. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::Document const *)arg1)->values_end();
  {
    Xapian::ValueIterator * resultobj = new Xapian::ValueIterator((const Xapian::ValueIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ValueIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_get_docid) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_get_docid. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::docid)((Xapian::Document const *)arg1)->get_docid();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_serialise) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_serialise. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Document const *)arg1)->serialise();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_unserialise) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::Document result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = Xapian::Document::unserialise((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Document * resultobj = new Xapian::Document((const Xapian::Document &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Document, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Document_get_description) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Document, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Document_get_description. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Registry) {
  Xapian::Registry *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::Registry *)new Xapian::Registry();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Registry, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Registry(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::Registry *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__Registry TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::Registry resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Registry_register_weighting_scheme) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::Weight *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Registry, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Registry_register_weighting_scheme. Expected SWIGTYPE_p_Xapian__Registry");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Weight, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Registry_register_weighting_scheme. Expected SWIGTYPE_p_Xapian__Weight");
    }
  }
  {
    try {
      (arg1)->register_weighting_scheme((Xapian::Weight const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Registry_get_weighting_scheme) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Registry, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Registry_get_weighting_scheme. Expected SWIGTYPE_p_Xapian__Registry");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::Weight *)((Xapian::Registry const *)arg1)->get_weighting_scheme((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Weight, 0);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Registry_register_posting_source) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::PostingSource *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Registry, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Registry_register_posting_source. Expected SWIGTYPE_p_Xapian__Registry");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__PostingSource, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Registry_register_posting_source. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  {
    try {
      (arg1)->register_posting_source((Xapian::PostingSource const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Registry_get_posting_source) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::PostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Registry, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Registry_get_posting_source. Expected SWIGTYPE_p_Xapian__Registry");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::PostingSource *)((Xapian::Registry const *)arg1)->get_posting_source((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PostingSource, 0);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Registry_register_match_spy) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::MatchSpy *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Registry, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Registry_register_match_spy. Expected SWIGTYPE_p_Xapian__Registry");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MatchSpy, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Registry_register_match_spy. Expected SWIGTYPE_p_Xapian__MatchSpy");
    }
  }
  {
    try {
      (arg1)->register_match_spy((Xapian::MatchSpy const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Registry_get_match_spy) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::MatchSpy *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Registry, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Registry_get_match_spy. Expected SWIGTYPE_p_Xapian__Registry");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::MatchSpy *)((Xapian::Registry const *)arg1)->get_match_spy((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MatchSpy, 0);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Registry_register_lat_long_metric) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::LatLongMetric *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Registry, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Registry_register_lat_long_metric. Expected SWIGTYPE_p_Xapian__Registry");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Registry_register_lat_long_metric. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  {
    try {
      (arg1)->register_lat_long_metric((Xapian::LatLongMetric const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Registry_get_lat_long_metric) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::LatLongMetric *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Registry, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Registry_get_lat_long_metric. Expected SWIGTYPE_p_Xapian__Registry");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::LatLongMetric *)((Xapian::Registry const *)arg1)->get_lat_long_metric((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongMetric, 0);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_MatchNothing_get) {
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::Query *)&Xapian::Query::MatchNothing;
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_MatchAll_get) {
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::Query *)&Xapian::Query::MatchAll;
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_0) {
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::Query *)new Xapian::Query();
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Query(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::Query *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__Query TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::Query resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_1) {
  std::string *arg1 = 0 ;
  Xapian::termcount arg2 ;
  Xapian::termpos arg3 ;
  std::string temp1 ;
  zval **args[3];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termpos) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_2) {
  std::string *arg1 = 0 ;
  Xapian::termcount arg2 ;
  std::string temp1 ;
  zval **args[2];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_3) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_4) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of new_Query. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_5) {
  double arg1 ;
  Xapian::Query *arg2 = 0 ;
  zval **args[2];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_Query. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_6) {
  Xapian::Query::op arg1 ;
  Xapian::Query *arg2 = 0 ;
  double arg3 ;
  zval **args[3];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_Query. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_7) {
  Xapian::Query::op arg1 ;
  Xapian::Query *arg2 = 0 ;
  Xapian::Query *arg3 = 0 ;
  zval **args[3];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_Query. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of new_Query. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,(Xapian::Query const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_8) {
  Xapian::Query::op arg1 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_9) {
  Xapian::Query::op arg1 ;
  Xapian::valueno arg2 ;
  std::string *arg3 = 0 ;
  std::string temp3 ;
  zval **args[3];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_10) {
  Xapian::Query::op arg1 ;
  Xapian::valueno arg2 ;
  std::string *arg3 = 0 ;
  std::string *arg4 = 0 ;
  std::string temp3 ;
  std::string temp4 ;
  zval **args[4];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  
  convert_to_string_ex(args[3]);
  temp4.assign(Z_STRVAL_PP(args[3]), Z_STRLEN_PP(args[3]));
  arg4 = &temp4;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_11) {
  Xapian::Query::op arg1 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  int arg4 ;
  Xapian::Query::op arg5 ;
  std::string temp2 ;
  zval **args[5];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[4]);
  arg5 = (Xapian::Query::op) Z_LVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_12) {
  Xapian::Query::op arg1 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  int arg4 ;
  std::string temp2 ;
  zval **args[4];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_13) {
  Xapian::Query::op arg1 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  std::string temp2 ;
  zval **args[3];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_14) {
  Xapian::Query::op arg1 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_17) {
  Xapian::Query::op arg1 ;
  XapianSWIGQueryItor arg2 ;
  XapianSWIGQueryItor arg3 ;
  Xapian::termcount arg4 ;
  zval **args[3];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    // arg2 and arg3 are default initialised where SWIG declares them.
    if (Z_TYPE_PP(args[1]) == IS_ARRAY) {
      // The typecheck typemap should have ensured this is an array.
      (&arg2)->begin(args[1] TSRMLS_CC);
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_18) {
  Xapian::Query::op arg1 ;
  XapianSWIGQueryItor arg2 ;
  XapianSWIGQueryItor arg3 ;
  zval **args[2];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    // arg2 and arg3 are default initialised where SWIG declares them.
    if (Z_TYPE_PP(args[1]) == IS_ARRAY) {
      // The typecheck typemap should have ensured this is an array.
      (&arg2)->begin(args[1] TSRMLS_CC);
    }
  }
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_get_terms_begin) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Query, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Query_get_terms_begin. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_terms_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_get_terms_end) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Query, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Query_get_terms_end. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::Query const *)arg1)->get_terms_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_get_unique_terms_begin) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Query, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Query_get_unique_terms_begin. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_unique_terms_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_get_length) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Query, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Query_get_length. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::termcount)((Xapian::Query const *)arg1)->get_length();
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_is_empty) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Query, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Query_is_empty. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)((Xapian::Query const *)arg1)->empty();
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_serialise) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Query, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Query_serialise. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Query const *)arg1)->serialise();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_unserialise__SWIG_0) {
  std::string *arg1 = 0 ;
  Xapian::Registry *arg2 = 0 ;
  std::string temp1 ;
  zval **args[2];
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Registry, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Query_unserialise. Expected SWIGTYPE_p_Xapian__Registry");
    }
  }
  {
    try {
      result = Xapian::Query::unserialise((std::string const &)*arg1,(Xapian::Registry const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_unserialise__SWIG_1) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = Xapian::Query::unserialise((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_unserialise) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Query_unserialise__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__Registry, 0) == 0);
      }
      if (_v) {
        _wrap_Query_unserialise__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Query_unserialise'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_get_type) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  zval **args[1];
  Xapian::Query::op result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Query, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Query_get_type. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::Query::op)((Xapian::Query const *)arg1)->get_type();
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_get_num_subqueries) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  zval **args[1];
  size_t result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Query, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Query_get_num_subqueries. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::Query const *)arg1)->get_num_subqueries();
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_get_subquery) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  size_t arg2 ;
  zval **args[2];
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Query, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Query_get_subquery. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (size_t) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_subquery(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Query_get_description) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Query, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Query_get_description. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_19) {
  Xapian::Query::op arg1 ;
  zval **args[1];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::Query::op) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Query) {
  int argc;
  zval **argv[5];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_Query__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__PostingSource, 0) >= 0);
    }
    if (_v) {
      _wrap_new_Query__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_Query__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _wrap_new_Query__SWIG_19(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_new_Query__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_Query__SWIG_14(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_ARRAY);
        /* FIXME: if we add more array typemaps, we'll need to check the elements
             * of the array here to disambiguate. */
      }
      if (_v) {
        if (argc <= 2) {
          _wrap_new_Query__SWIG_18(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
        _wrap_new_Query__SWIG_18(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__Query, 0) == 0);
      }
      if (_v) {
        _wrap_new_Query__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_new_Query__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__Query, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__Query, 0) == 0);
        }
        if (_v) {
          _wrap_new_Query__SWIG_7(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__Query, 0) == 0);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          _wrap_new_Query__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_new_Query__SWIG_8(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_new_Query__SWIG_13(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_new_Query__SWIG_9(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_ARRAY);
        /* FIXME: if we add more array typemaps, we'll need to check the elements
             * of the array here to disambiguate. */
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_new_Query__SWIG_17(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_new_Query__SWIG_12(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_STRING);
        }
        if (_v) {
          {
            _v = (Z_TYPE_PP(argv[3]) == IS_STRING);
          }
          if (_v) {
            _wrap_new_Query__SWIG_10(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_LONG); 
            if (_v) {
              _wrap_new_Query__SWIG_11(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_Query'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_StemImplementation) {
  zval *arg0;
  zval **args[1];
  Xapian::StemImplementation *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        SWIG_PHP_Error(E_ERROR, "accessing abstract class or protected constructor");
      } else {
        result = (Xapian::StemImplementation *)new SwigDirector_StemImplementation(arg0 TSRMLS_CC);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__StemImplementation, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_StemImplementation(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::StemImplementation *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__StemImplementation TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::StemImplementation resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_StemImplementation_apply) {
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__StemImplementation, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of StemImplementation_apply. Expected SWIGTYPE_p_Xapian__StemImplementation");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianStemImplementation", (char *)"operator ()" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::StemImplementation::operator ()" TSRMLS_CC);
      } else {
        result = (arg1)->operator ()((std::string const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_StemImplementation_get_description) {
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  zval **args[1];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__StemImplementation, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of StemImplementation_get_description. Expected SWIGTYPE_p_Xapian__StemImplementation");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianStemImplementation", (char *)"get_description" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::StemImplementation::get_description" TSRMLS_CC);
      } else {
        result = ((Xapian::StemImplementation const *)arg1)->get_description();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Stem__SWIG_0) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::Stem *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Stem, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Stem__SWIG_1) {
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  zval **args[1];
  Xapian::Stem *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__StemImplementation, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of new_Stem. Expected SWIGTYPE_p_Xapian__StemImplementation");
    }
  }
  {
    try {
      result = (Xapian::Stem *)new Xapian::Stem(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Stem, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Stem) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__StemImplementation, 0) >= 0);
    }
    if (_v) {
      _wrap_new_Stem__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_Stem__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_Stem'";
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Stem(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::Stem *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__Stem TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::Stem resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Stem_apply) {
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Stem, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Stem_apply. Expected SWIGTYPE_p_Xapian__Stem");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Stem const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Stem_get_description) {
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Stem, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Stem_get_description. Expected SWIGTYPE_p_Xapian__Stem");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Stem const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Stem_get_available_languages) {
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = Xapian::Stem::get_available_languages();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_TermGenerator) {
  Xapian::TermGenerator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::TermGenerator *)new Xapian::TermGenerator();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__TermGenerator, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_TermGenerator(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::TermGenerator *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__TermGenerator TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::TermGenerator resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_stemmer) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Stem *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_stemmer. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of TermGenerator_set_stemmer. Expected SWIGTYPE_p_Xapian__Stem");
    }
  }
  {
    try {
      (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_stopper__SWIG_0) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_stopper. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Stopper, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of TermGenerator_set_stopper. Expected SWIGTYPE_p_Xapian__Stopper");
    }
  }
  {
    try {
      (arg1)->set_stopper((Xapian::Stopper const *)arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_stopper__SWIG_1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_stopper. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->set_stopper();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_stopper) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      _wrap_TermGenerator_set_stopper__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(*argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__Stopper, 0) >= 0);
      }
      if (_v) {
        _wrap_TermGenerator_set_stopper__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'TermGenerator_set_stopper'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_document) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_document. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of TermGenerator_set_document. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  {
    try {
      (arg1)->set_document((Xapian::Document const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_get_document) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  zval **args[1];
  Xapian::Document *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_get_document. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::Document *) &((Xapian::TermGenerator const *)arg1)->get_document();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Document, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_database) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::WritableDatabase *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_database. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of TermGenerator_set_database. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  {
    try {
      (arg1)->set_database((Xapian::WritableDatabase const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_flags__SWIG_0) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::flags arg2 ;
  Xapian::TermGenerator::flags arg3 ;
  zval **args[3];
  Xapian::TermGenerator::flags result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_flags. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::TermGenerator::flags) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::TermGenerator::flags) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_flags__SWIG_1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::flags arg2 ;
  zval **args[2];
  Xapian::TermGenerator::flags result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_flags. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::TermGenerator::flags) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_flags) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_TermGenerator_set_flags__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_TermGenerator_set_flags__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'TermGenerator_set_flags'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_stemming_strategy) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::stem_strategy arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_stemming_strategy. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::TermGenerator::stem_strategy) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_stemming_strategy(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_stopper_strategy) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::stop_strategy arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_stopper_strategy. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::TermGenerator::stop_strategy) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_stopper_strategy(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_max_word_length) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  unsigned int arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_max_word_length. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (unsigned int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_max_word_length(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text__SWIG_0) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  std::string *arg4 = 0 ;
  std::string temp2 ;
  std::string temp4 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_index_text. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[3]);
  temp4.assign(Z_STRVAL_PP(args[3]), Z_STRLEN_PP(args[3]));
  arg4 = &temp4;
  
  {
    try {
      (arg1)->index_text((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text__SWIG_1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_index_text. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->index_text((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text__SWIG_2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_index_text. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->index_text((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_TermGenerator_index_text__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_TermGenerator_index_text__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          {
            _v = (Z_TYPE_PP(argv[3]) == IS_STRING);
          }
          if (_v) {
            _wrap_TermGenerator_index_text__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'TermGenerator_index_text'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text_without_positions__SWIG_0) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  std::string *arg4 = 0 ;
  std::string temp2 ;
  std::string temp4 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_index_text_without_positions. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[3]);
  temp4.assign(Z_STRVAL_PP(args[3]), Z_STRLEN_PP(args[3]));
  arg4 = &temp4;
  
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text_without_positions__SWIG_1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_index_text_without_positions. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text_without_positions__SWIG_2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_index_text_without_positions. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text_without_positions) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_TermGenerator_index_text_without_positions__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_TermGenerator_index_text_without_positions__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          {
            _v = (Z_TYPE_PP(argv[3]) == IS_STRING);
          }
          if (_v) {
            _wrap_TermGenerator_index_text_without_positions__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'TermGenerator_index_text_without_positions'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_increase_termpos__SWIG_0) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termpos arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_increase_termpos. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termpos) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->increase_termpos(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_increase_termpos__SWIG_1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_increase_termpos. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->increase_termpos();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_increase_termpos) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      _wrap_TermGenerator_increase_termpos__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__TermGenerator, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_TermGenerator_increase_termpos__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'TermGenerator_increase_termpos'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_get_termpos) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  zval **args[1];
  Xapian::termpos result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_get_termpos. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termpos)((Xapian::TermGenerator const *)arg1)->get_termpos();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_termpos) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termpos arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_set_termpos. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termpos) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_termpos(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TermGenerator_get_description) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TermGenerator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TermGenerator_get_description. Expected SWIGTYPE_p_Xapian__TermGenerator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::TermGenerator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_MSet) {
  Xapian::MSet *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::MSet *)new Xapian::MSet();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MSet, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_MSet(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::MSet *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__MSet TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::MSet resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_convert_to_percent__SWIG_0) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  double arg2 ;
  zval **args[2];
  int result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_convert_to_percent. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (int)((Xapian::MSet const *)arg1)->convert_to_percent(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_convert_to_percent__SWIG_1) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval **args[2];
  int result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_convert_to_percent. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of MSet_convert_to_percent. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  {
    try {
      result = (int)((Xapian::MSet const *)arg1)->convert_to_percent((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_convert_to_percent) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__MSetIterator, 0) == 0);
      }
      if (_v) {
        _wrap_MSet_convert_to_percent__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_DOUBLE); 
      if (_v) {
        _wrap_MSet_convert_to_percent__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'MSet_convert_to_percent'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_termfreq) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_termfreq. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_termfreq((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_termweight) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_termweight. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (double)((Xapian::MSet const *)arg1)->get_termweight((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_firstitem) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_firstitem. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_firstitem();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_matches_lower_bound) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_matches_lower_bound. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_lower_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_matches_estimated) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_matches_estimated. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_estimated();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_matches_upper_bound) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_matches_upper_bound. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_upper_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_uncollapsed_matches_lower_bound) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_uncollapsed_matches_lower_bound. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_lower_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_uncollapsed_matches_estimated) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_uncollapsed_matches_estimated. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_estimated();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_uncollapsed_matches_upper_bound) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_uncollapsed_matches_upper_bound. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_upper_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_max_attained) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_max_attained. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::MSet const *)arg1)->get_max_attained();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_max_possible) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_max_possible. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::MSet const *)arg1)->get_max_possible();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_snippet__SWIG_0) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  Xapian::Stem *arg4 = 0 ;
  unsigned int arg5 ;
  std::string *arg6 = 0 ;
  std::string *arg7 = 0 ;
  std::string *arg8 = 0 ;
  std::string temp2 ;
  std::string temp6 ;
  std::string temp7 ;
  std::string temp8 ;
  zval **args[8];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 8 || zend_get_parameters_array_ex(8, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_snippet. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (size_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg4 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of MSet_snippet. Expected SWIGTYPE_p_Xapian__Stem");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[4]);
  arg5 = (unsigned int) Z_LVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[5]);
  temp6.assign(Z_STRVAL_PP(args[5]), Z_STRLEN_PP(args[5]));
  arg6 = &temp6;
  
  
  convert_to_string_ex(args[6]);
  temp7.assign(Z_STRVAL_PP(args[6]), Z_STRLEN_PP(args[6]));
  arg7 = &temp7;
  
  
  convert_to_string_ex(args[7]);
  temp8.assign(Z_STRVAL_PP(args[7]), Z_STRLEN_PP(args[7]));
  arg8 = &temp8;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3,(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6,(std::string const &)*arg7,(std::string const &)*arg8);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_snippet__SWIG_1) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  Xapian::Stem *arg4 = 0 ;
  unsigned int arg5 ;
  std::string *arg6 = 0 ;
  std::string *arg7 = 0 ;
  std::string temp2 ;
  std::string temp6 ;
  std::string temp7 ;
  zval **args[7];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 7 || zend_get_parameters_array_ex(7, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_snippet. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (size_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg4 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of MSet_snippet. Expected SWIGTYPE_p_Xapian__Stem");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[4]);
  arg5 = (unsigned int) Z_LVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[5]);
  temp6.assign(Z_STRVAL_PP(args[5]), Z_STRLEN_PP(args[5]));
  arg6 = &temp6;
  
  
  convert_to_string_ex(args[6]);
  temp7.assign(Z_STRVAL_PP(args[6]), Z_STRLEN_PP(args[6]));
  arg7 = &temp7;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3,(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6,(std::string const &)*arg7);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_snippet__SWIG_2) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  Xapian::Stem *arg4 = 0 ;
  unsigned int arg5 ;
  std::string *arg6 = 0 ;
  std::string temp2 ;
  std::string temp6 ;
  zval **args[6];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_snippet. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (size_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg4 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of MSet_snippet. Expected SWIGTYPE_p_Xapian__Stem");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[4]);
  arg5 = (unsigned int) Z_LVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[5]);
  temp6.assign(Z_STRVAL_PP(args[5]), Z_STRLEN_PP(args[5]));
  arg6 = &temp6;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3,(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_snippet__SWIG_3) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  Xapian::Stem *arg4 = 0 ;
  unsigned int arg5 ;
  std::string temp2 ;
  zval **args[5];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_snippet. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (size_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg4 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of MSet_snippet. Expected SWIGTYPE_p_Xapian__Stem");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[4]);
  arg5 = (unsigned int) Z_LVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3,(Xapian::Stem const &)*arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_snippet__SWIG_4) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  Xapian::Stem *arg4 = 0 ;
  std::string temp2 ;
  zval **args[4];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_snippet. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (size_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg4 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of MSet_snippet. Expected SWIGTYPE_p_Xapian__Stem");
    }
  }
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3,(Xapian::Stem const &)*arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_snippet__SWIG_5) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  std::string temp2 ;
  zval **args[3];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_snippet. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (size_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_snippet__SWIG_6) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_snippet. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_snippet) {
  int argc;
  zval **argv[8];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_MSet_snippet__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_MSet_snippet__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          {
            void *ptr;
            _v = (SWIG_ConvertPtr(*argv[3], (void **)&ptr, SWIGTYPE_p_Xapian__Stem, 0) == 0);
          }
          if (_v) {
            _wrap_MSet_snippet__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          {
            void *ptr;
            _v = (SWIG_ConvertPtr(*argv[3], (void **)&ptr, SWIGTYPE_p_Xapian__Stem, 0) == 0);
          }
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_LONG); 
            if (_v) {
              _wrap_MSet_snippet__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          {
            void *ptr;
            _v = (SWIG_ConvertPtr(*argv[3], (void **)&ptr, SWIGTYPE_p_Xapian__Stem, 0) == 0);
          }
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_LONG); 
            if (_v) {
              {
                _v = (Z_TYPE_PP(argv[5]) == IS_STRING);
              }
              if (_v) {
                _wrap_MSet_snippet__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          {
            void *ptr;
            _v = (SWIG_ConvertPtr(*argv[3], (void **)&ptr, SWIGTYPE_p_Xapian__Stem, 0) == 0);
          }
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_LONG); 
            if (_v) {
              {
                _v = (Z_TYPE_PP(argv[5]) == IS_STRING);
              }
              if (_v) {
                {
                  _v = (Z_TYPE_PP(argv[6]) == IS_STRING);
                }
                if (_v) {
                  _wrap_MSet_snippet__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          {
            void *ptr;
            _v = (SWIG_ConvertPtr(*argv[3], (void **)&ptr, SWIGTYPE_p_Xapian__Stem, 0) == 0);
          }
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_LONG); 
            if (_v) {
              {
                _v = (Z_TYPE_PP(argv[5]) == IS_STRING);
              }
              if (_v) {
                {
                  _v = (Z_TYPE_PP(argv[6]) == IS_STRING);
                }
                if (_v) {
                  {
                    _v = (Z_TYPE_PP(argv[7]) == IS_STRING);
                  }
                  if (_v) {
                    _wrap_MSet_snippet__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'MSet_snippet'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_fetch__SWIG_0) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  Xapian::MSetIterator *arg3 = 0 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_fetch. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of MSet_fetch. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of MSet_fetch. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch((Xapian::MSetIterator const &)*arg2,(Xapian::MSetIterator const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_fetch__SWIG_1) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_fetch. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of MSet_fetch. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_fetch__SWIG_2) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_fetch. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_fetch) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      _wrap_MSet_fetch__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__MSetIterator, 0) == 0);
      }
      if (_v) {
        _wrap_MSet_fetch__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSet, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__MSetIterator, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__MSetIterator, 0) == 0);
        }
        if (_v) {
          _wrap_MSet_fetch__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'MSet_fetch'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_size) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_size. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->size();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_is_empty) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_is_empty. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (bool)((Xapian::MSet const *)arg1)->empty();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_begin) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::MSetIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_begin. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::MSet const *)arg1)->begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSetIterator * resultobj = new Xapian::MSetIterator((const Xapian::MSetIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSetIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_end) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::MSetIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_end. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::MSet const *)arg1)->end();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSetIterator * resultobj = new Xapian::MSetIterator((const Xapian::MSetIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSetIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_back) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  Xapian::MSetIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_back. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::MSet const *)arg1)->back();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSetIterator * resultobj = new Xapian::MSetIterator((const Xapian::MSetIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSetIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_description) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_description. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::MSet const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_docid) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  zval **args[2];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_docid. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::docid)Xapian_MSet_get_docid((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_document) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  zval **args[2];
  Xapian::Document result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_document. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian_MSet_get_document((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Document * resultobj = new Xapian::Document((const Xapian::Document &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Document, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_hit) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  zval **args[2];
  Xapian::MSetIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_hit. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian_MSet_get_hit((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSetIterator * resultobj = new Xapian::MSetIterator((const Xapian::MSetIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSetIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSet_get_document_percentage) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  zval **args[2];
  int result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSet_get_document_percentage. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (int)Xapian_MSet_get_document_percentage((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_mset_set) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSet *arg2 = (Xapian::MSet *) 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_mset_set. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of MSetIterator_mset_set. Expected SWIGTYPE_p_Xapian__MSet");
    }
  }
  if (arg1) (arg1)->mset = *arg2;
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_mset_get) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  Xapian::MSet *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_mset_get. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::MSet *)& ((arg1)->mset);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MSet, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_off_from_end_set) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSet::size_type arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_off_from_end_set. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::MSet::size_type) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  if (arg1) (arg1)->off_from_end = arg2;
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_off_from_end_get) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  Xapian::MSet::size_type result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_off_from_end_get. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::MSet::size_type) ((arg1)->off_from_end);
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_MSetIterator) {
  Xapian::MSetIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::MSetIterator *)new Xapian::MSetIterator();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MSetIterator, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_rank) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_get_rank. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_rank();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_document) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  Xapian::Document result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_get_document. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_document();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Document * resultobj = new Xapian::Document((const Xapian::Document &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Document, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_weight) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_get_weight. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::MSetIterator const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_collapse_key) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_get_collapse_key. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_collapse_key();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_collapse_count) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_get_collapse_count. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_collapse_count();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_sort_key) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_get_sort_key. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_sort_key();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_percent) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_get_percent. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (int)((Xapian::MSetIterator const *)arg1)->get_percent();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_description) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_get_description. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_key) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  Xapian::MSetIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_key. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::MSetIterator *) &Xapian_MSetIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MSetIterator, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_current) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_current. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::docid)Xapian_MSetIterator_current(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_valid) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_valid. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)Xapian_MSetIterator_valid(arg1);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_rewind) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_rewind. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  Xapian_MSetIterator_rewind(arg1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_equals) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_equals. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of MSetIterator_equals. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  {
    try {
      result = (bool)Xapian_MSetIterator_equals((Xapian::MSetIterator const *)arg1,(Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_docid) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_get_docid. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::docid)Xapian_MSetIterator_get_docid((Xapian::MSetIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_next) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_next. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      Xapian_MSetIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MSetIterator_prev) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MSetIterator_prev. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      Xapian_MSetIterator_prev(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_MSetIterator(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::MSetIterator *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__MSetIterator TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::MSetIterator resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ESet) {
  Xapian::ESet *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::ESet *)new Xapian::ESet();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ESet, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ESet(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ESet *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ESet TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ESet resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESet_size) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESet_size. Expected SWIGTYPE_p_Xapian__ESet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::ESet const *)arg1)->size();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESet_is_empty) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESet_is_empty. Expected SWIGTYPE_p_Xapian__ESet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (bool)((Xapian::ESet const *)arg1)->empty();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESet_get_ebound) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESet_get_ebound. Expected SWIGTYPE_p_Xapian__ESet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termcount)((Xapian::ESet const *)arg1)->get_ebound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESet_begin) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  zval **args[1];
  Xapian::ESetIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESet_begin. Expected SWIGTYPE_p_Xapian__ESet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ESet const *)arg1)->begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESetIterator * resultobj = new Xapian::ESetIterator((const Xapian::ESetIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESetIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESet_end) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  zval **args[1];
  Xapian::ESetIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESet_end. Expected SWIGTYPE_p_Xapian__ESet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ESet const *)arg1)->end();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESetIterator * resultobj = new Xapian::ESetIterator((const Xapian::ESetIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESetIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESet_back) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  zval **args[1];
  Xapian::ESetIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESet_back. Expected SWIGTYPE_p_Xapian__ESet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ESet const *)arg1)->back();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESetIterator * resultobj = new Xapian::ESetIterator((const Xapian::ESetIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESetIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESet_get_description) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESet_get_description. Expected SWIGTYPE_p_Xapian__ESet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ESet const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_eset_set) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESet *arg2 = (Xapian::ESet *) 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_eset_set. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__ESet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of ESetIterator_eset_set. Expected SWIGTYPE_p_Xapian__ESet");
    }
  }
  if (arg1) (arg1)->eset = *arg2;
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_eset_get) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  Xapian::ESet *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_eset_get. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::ESet *)& ((arg1)->eset);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ESet, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_off_from_end_set) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESet::size_type arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_off_from_end_set. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::ESet::size_type) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  if (arg1) (arg1)->off_from_end = arg2;
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_off_from_end_get) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  Xapian::ESet::size_type result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_off_from_end_get. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::ESet::size_type) ((arg1)->off_from_end);
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ESetIterator) {
  Xapian::ESetIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::ESetIterator *)new Xapian::ESetIterator();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ESetIterator, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_get_weight) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_get_weight. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::ESetIterator const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_get_description) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_get_description. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ESetIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_key) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  Xapian::ESetIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_key. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (Xapian::ESetIterator *) &Xapian_ESetIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ESetIterator, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_current) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_current. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = Xapian_ESetIterator_current(arg1);
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_valid) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_valid. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)Xapian_ESetIterator_valid(arg1);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_rewind) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_rewind. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  Xapian_ESetIterator_rewind(arg1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_equals) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESetIterator *arg2 = 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_equals. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of ESetIterator_equals. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  {
    try {
      result = (bool)Xapian_ESetIterator_equals((Xapian::ESetIterator const *)arg1,(Xapian::ESetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_get_term) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_get_term. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = Xapian_ESetIterator_get_term((Xapian::ESetIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_next) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_next. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      Xapian_ESetIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ESetIterator_prev) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESetIterator_prev. Expected SWIGTYPE_p_Xapian__ESetIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      Xapian_ESetIterator_prev(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ESetIterator(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ESetIterator *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ESetIterator TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ESetIterator resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_RSet) {
  Xapian::RSet *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::RSet *)new Xapian::RSet();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__RSet, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_RSet(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::RSet *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__RSet TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::RSet resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_size) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RSet_size. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::RSet const *)arg1)->size();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_is_empty) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RSet_is_empty. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (bool)((Xapian::RSet const *)arg1)->empty();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_add_document__SWIG_0) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RSet_add_document. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_document(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_add_document__SWIG_1) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RSet_add_document. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of RSet_add_document. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  {
    try {
      (arg1)->add_document((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_add_document) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__MSetIterator, 0) == 0);
      }
      if (_v) {
        _wrap_RSet_add_document__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_RSet_add_document__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'RSet_add_document'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_remove_document__SWIG_0) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RSet_remove_document. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->remove_document(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_remove_document__SWIG_1) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RSet_remove_document. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of RSet_remove_document. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  {
    try {
      (arg1)->remove_document((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_remove_document) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__MSetIterator, 0) == 0);
      }
      if (_v) {
        _wrap_RSet_remove_document__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_RSet_remove_document__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'RSet_remove_document'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_contains__SWIG_0) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RSet_contains. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (bool)((Xapian::RSet const *)arg1)->contains(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_contains__SWIG_1) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RSet_contains. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of RSet_contains. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  {
    try {
      result = (bool)((Xapian::RSet const *)arg1)->contains((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_contains) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__MSetIterator, 0) == 0);
      }
      if (_v) {
        _wrap_RSet_contains__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_RSet_contains__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'RSet_contains'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RSet_get_description) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RSet_get_description. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::RSet const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_MatchDecider) {
  zval *arg0;
  zval **args[1];
  Xapian::MatchDecider *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        SWIG_PHP_Error(E_ERROR, "accessing abstract class or protected constructor");
      } else {
        result = (Xapian::MatchDecider *)new SwigDirector_MatchDecider(arg0 TSRMLS_CC);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MatchDecider, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MatchDecider_apply) {
  Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval **args[2];
  bool upcall = false;
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MatchDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MatchDecider_apply. Expected SWIGTYPE_p_Xapian__MatchDecider");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of MatchDecider_apply. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianMatchDecider", (char *)"operator ()" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::MatchDecider::operator ()" TSRMLS_CC);
      } else {
        result = (bool)((Xapian::MatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_MatchDecider(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::MatchDecider *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__MatchDecider TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::MatchDecider resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Enquire) {
  Xapian::Database *arg1 = 0 ;
  zval **args[1];
  Xapian::Enquire *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg1 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of new_Enquire. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  {
    try {
      result = (Xapian::Enquire *)new Xapian::Enquire((Xapian::Database const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Enquire, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Enquire(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::Enquire *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__Enquire TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::Enquire resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_query__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *arg2 = 0 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_query. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Enquire_set_query. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_query((Xapian::Query const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_query__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_query. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Enquire_set_query. Expected SWIGTYPE_p_Xapian__Query");
    }
  }
  {
    try {
      (arg1)->set_query((Xapian::Query const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_query) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__Query, 0) == 0);
      }
      if (_v) {
        _wrap_Enquire_set_query__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__Query, 0) == 0);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_Enquire_set_query__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Enquire_set_query'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_query) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  zval **args[1];
  Xapian::Query *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_query. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::Query *) &((Xapian::Enquire const *)arg1)->get_query();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Query, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_add_matchspy) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MatchSpy *arg2 = (Xapian::MatchSpy *) 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_add_matchspy. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Enquire_add_matchspy. Expected SWIGTYPE_p_Xapian__MatchSpy");
    }
  }
  {
    try {
      (arg1)->add_matchspy(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_clear_matchspies) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_clear_matchspies. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->clear_matchspies();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_weighting_scheme) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Weight *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_weighting_scheme. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Weight, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Enquire_set_weighting_scheme. Expected SWIGTYPE_p_Xapian__Weight");
    }
  }
  {
    try {
      (arg1)->set_weighting_scheme((Xapian::Weight const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_expansion_scheme__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  std::string *arg2 = 0 ;
  double arg3 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_expansion_scheme. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      ((Xapian::Enquire const *)arg1)->set_expansion_scheme((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_expansion_scheme__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_expansion_scheme. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      ((Xapian::Enquire const *)arg1)->set_expansion_scheme((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_expansion_scheme) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_Enquire_set_expansion_scheme__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          _wrap_Enquire_set_expansion_scheme__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Enquire_set_expansion_scheme'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_collapse_key__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  Xapian::doccount arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_collapse_key. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::doccount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_collapse_key(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_collapse_key__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_collapse_key. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_collapse_key(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_collapse_key) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_Enquire_set_collapse_key__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_Enquire_set_collapse_key__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Enquire_set_collapse_key'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_docid_order) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Enquire::docid_order arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_docid_order. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::Enquire::docid_order) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_docid_order(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_cutoff__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  int arg2 ;
  double arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_cutoff. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_cutoff(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_cutoff__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  int arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_cutoff. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_cutoff(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_cutoff) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_Enquire_set_cutoff__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          _wrap_Enquire_set_cutoff__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Enquire_set_cutoff'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_relevance) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_sort_by_relevance. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->set_sort_by_relevance();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_value) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_sort_by_value. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_value(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_key) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_sort_by_key. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__KeyMaker, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Enquire_set_sort_by_key. Expected SWIGTYPE_p_Xapian__KeyMaker");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_key(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_value_then_relevance) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_sort_by_value_then_relevance. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_value_then_relevance(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_key_then_relevance) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_sort_by_key_then_relevance. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__KeyMaker, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Enquire_set_sort_by_key_then_relevance. Expected SWIGTYPE_p_Xapian__KeyMaker");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_key_then_relevance(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_relevance_then_value) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_sort_by_relevance_then_value. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_relevance_then_value(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_relevance_then_key) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_sort_by_relevance_then_key. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__KeyMaker, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Enquire_set_sort_by_relevance_then_key. Expected SWIGTYPE_p_Xapian__KeyMaker");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_relevance_then_key(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_set_time_limit) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  double arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_set_time_limit. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_time_limit(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_mset__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::doccount arg4 ;
  Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
  Xapian::MatchDecider *arg6 = (Xapian::MatchDecider *) 0 ;
  zval **args[6];
  Xapian::MSet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::doccount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::doccount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[4], (void **) &arg5, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 5 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[5], (void **) &arg6, SWIGTYPE_p_Xapian__MatchDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 6 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__MatchDecider");
    }
  }
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSet * resultobj = new Xapian::MSet((const Xapian::MSet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_mset__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::doccount arg4 ;
  Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
  zval **args[5];
  Xapian::MSet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::doccount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::doccount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[4], (void **) &arg5, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 5 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSet * resultobj = new Xapian::MSet((const Xapian::MSet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_mset__SWIG_2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::doccount arg4 ;
  zval **args[4];
  Xapian::MSet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::doccount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::doccount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSet * resultobj = new Xapian::MSet((const Xapian::MSet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_mset__SWIG_3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  zval **args[3];
  Xapian::MSet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::doccount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSet * resultobj = new Xapian::MSet((const Xapian::MSet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_mset__SWIG_4) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::RSet *arg4 = (Xapian::RSet *) 0 ;
  Xapian::MatchDecider *arg5 = (Xapian::MatchDecider *) 0 ;
  zval **args[5];
  Xapian::MSet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::doccount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[4], (void **) &arg5, SWIGTYPE_p_Xapian__MatchDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 5 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__MatchDecider");
    }
  }
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4,(Xapian::MatchDecider const *)arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSet * resultobj = new Xapian::MSet((const Xapian::MSet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_mset__SWIG_5) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::RSet *arg4 = (Xapian::RSet *) 0 ;
  zval **args[4];
  Xapian::MSet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::doccount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of Enquire_get_mset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSet * resultobj = new Xapian::MSet((const Xapian::MSet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_mset) {
  int argc;
  zval **argv[6];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_Enquire_get_mset__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(*argv[3], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
          }
          if (_v) {
            _wrap_Enquire_get_mset__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_Enquire_get_mset__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(*argv[3], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
          }
          if (_v) {
            {
              void *tmp;
              _v = (SWIG_ConvertPtr(*argv[4], (void**)&tmp, SWIGTYPE_p_Xapian__MatchDecider, 0) >= 0);
            }
            if (_v) {
              _wrap_Enquire_get_mset__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            {
              void *tmp;
              _v = (SWIG_ConvertPtr(*argv[4], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
            }
            if (_v) {
              _wrap_Enquire_get_mset__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            {
              void *tmp;
              _v = (SWIG_ConvertPtr(*argv[4], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
            }
            if (_v) {
              {
                void *tmp;
                _v = (SWIG_ConvertPtr(*argv[5], (void**)&tmp, SWIGTYPE_p_Xapian__MatchDecider, 0) >= 0);
              }
              if (_v) {
                _wrap_Enquire_get_mset__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
              }
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Enquire_get_mset'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  Xapian::ExpandDecider *arg5 = (Xapian::ExpandDecider *) 0 ;
  double arg6 ;
  zval **args[6];
  Xapian::ESet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[4], (void **) &arg5, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 5 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__ExpandDecider");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,(Xapian::ExpandDecider const *)arg5,arg6);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESet * resultobj = new Xapian::ESet((const Xapian::ESet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  Xapian::ExpandDecider *arg5 = (Xapian::ExpandDecider *) 0 ;
  zval **args[5];
  Xapian::ESet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[4], (void **) &arg5, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 5 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__ExpandDecider");
    }
  }
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,(Xapian::ExpandDecider const *)arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESet * resultobj = new Xapian::ESet((const Xapian::ESet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset__SWIG_2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  zval **args[4];
  Xapian::ESet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESet * resultobj = new Xapian::ESet((const Xapian::ESet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset__SWIG_3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  zval **args[3];
  Xapian::ESet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESet * resultobj = new Xapian::ESet((const Xapian::ESet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset__SWIG_4) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  Xapian::ExpandDecider *arg4 = (Xapian::ExpandDecider *) 0 ;
  zval **args[4];
  Xapian::ESet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__ExpandDecider");
    }
  }
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,(Xapian::ExpandDecider const *)arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESet * resultobj = new Xapian::ESet((const Xapian::ESet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset__SWIG_5) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  Xapian::ExpandDecider *arg6 = (Xapian::ExpandDecider *) 0 ;
  double arg7 ;
  zval **args[7];
  Xapian::ESet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 7 || zend_get_parameters_array_ex(7, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[5], (void **) &arg6, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 6 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__ExpandDecider");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[6]);
  arg7 = (double) Z_DVAL_PP(args[6]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6,arg7);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESet * resultobj = new Xapian::ESet((const Xapian::ESet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset__SWIG_6) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  Xapian::ExpandDecider *arg6 = (Xapian::ExpandDecider *) 0 ;
  zval **args[6];
  Xapian::ESet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[5], (void **) &arg6, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 6 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__ExpandDecider");
    }
  }
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESet * resultobj = new Xapian::ESet((const Xapian::ESet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset__SWIG_7) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  zval **args[5];
  Xapian::ESet result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Enquire_get_eset. Expected SWIGTYPE_p_Xapian__RSet");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESet * resultobj = new Xapian::ESet((const Xapian::ESet &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset) {
  int argc;
  zval **argv[7];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__RSet, 0) == 0);
        }
        if (_v) {
          _wrap_Enquire_get_eset__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__RSet, 0) == 0);
        }
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(*argv[3], (void**)&tmp, SWIGTYPE_p_Xapian__ExpandDecider, 0) >= 0);
          }
          if (_v) {
            _wrap_Enquire_get_eset__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__RSet, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_Enquire_get_eset__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__RSet, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            {
              void *tmp;
              _v = (SWIG_ConvertPtr(*argv[4], (void**)&tmp, SWIGTYPE_p_Xapian__ExpandDecider, 0) >= 0);
            }
            if (_v) {
              _wrap_Enquire_get_eset__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__RSet, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_DOUBLE); 
            if (_v) {
              _wrap_Enquire_get_eset__SWIG_7(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__RSet, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            {
              void *tmp;
              _v = (SWIG_ConvertPtr(*argv[4], (void**)&tmp, SWIGTYPE_p_Xapian__ExpandDecider, 0) >= 0);
            }
            if (_v) {
              _v = (Z_TYPE_PP(argv[5]) == IS_DOUBLE); 
              if (_v) {
                _wrap_Enquire_get_eset__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__RSet, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_DOUBLE); 
            if (_v) {
              {
                void *tmp;
                _v = (SWIG_ConvertPtr(*argv[5], (void**)&tmp, SWIGTYPE_p_Xapian__ExpandDecider, 0) >= 0);
              }
              if (_v) {
                _wrap_Enquire_get_eset__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__RSet, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_DOUBLE); 
            if (_v) {
              {
                void *tmp;
                _v = (SWIG_ConvertPtr(*argv[5], (void**)&tmp, SWIGTYPE_p_Xapian__ExpandDecider, 0) >= 0);
              }
              if (_v) {
                _v = (Z_TYPE_PP(argv[6]) == IS_DOUBLE); 
                if (_v) {
                  _wrap_Enquire_get_eset__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
                }
              }
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Enquire_get_eset'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_begin__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_matching_terms_begin. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_end__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_matching_terms_end. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end(arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_begin__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_matching_terms_begin. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Enquire_get_matching_terms_begin. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_begin) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__MSetIterator, 0) == 0);
      }
      if (_v) {
        _wrap_Enquire_get_matching_terms_begin__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_Enquire_get_matching_terms_begin__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Enquire_get_matching_terms_begin'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_end__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_matching_terms_end. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Enquire_get_matching_terms_end. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end((Xapian::MSetIterator const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_end) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__MSetIterator, 0) == 0);
      }
      if (_v) {
        _wrap_Enquire_get_matching_terms_end__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Enquire, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_Enquire_get_matching_terms_end__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Enquire_get_matching_terms_end'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_description) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_description. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval **args[2];
  std::pair< Xapian::TermIterator,Xapian::TermIterator > result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Enquire, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Enquire_get_matching_terms. Expected SWIGTYPE_p_Xapian__Enquire");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Enquire_get_matching_terms. Expected SWIGTYPE_p_Xapian__MSetIterator");
    }
  }
  {
    try {
      result = Xapian_Enquire_get_matching_terms((Xapian::Enquire const *)arg1,(Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    if (array_init(return_value) == FAILURE) {
      SWIG_PHP_Error(E_ERROR, "array_init failed");
    }
    
    for (Xapian::TermIterator i = (&result)->first; i != (&result)->second; ++i) {
      /* We have to cast away const here because the PHP API is rather
      	 * poorly thought out - really there should be two API methods
      	 * one of which takes a const char * and copies the string and
      	 * the other which takes char * and takes ownership of the string.
      	 *
      	 * Passing 1 as the last parameter of add_next_index_stringl() tells
      	 * PHP to copy the string pointed to by p, so it won't be modified.
      	 */
      const string & term = *i;
      char *p = const_cast<char*>(term.data());
      add_next_index_stringl(return_value, p, term.length(), 1);
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ExpandDecider) {
  zval *arg0;
  zval **args[1];
  Xapian::ExpandDecider *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        SWIG_PHP_Error(E_ERROR, "accessing abstract class or protected constructor");
      } else {
        result = (Xapian::ExpandDecider *)new SwigDirector_ExpandDecider(arg0 TSRMLS_CC);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ExpandDecider, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ExpandDecider_apply) {
  Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  bool upcall = false;
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ExpandDecider_apply. Expected SWIGTYPE_p_Xapian__ExpandDecider");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianExpandDecider", (char *)"operator ()" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::ExpandDecider::operator ()" TSRMLS_CC);
      } else {
        result = (bool)((Xapian::ExpandDecider const *)arg1)->operator ()((std::string const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ExpandDecider(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ExpandDecider *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ExpandDecider TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ExpandDecider resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ExpandDecider_release) {
  Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
  zval **args[1];
  Xapian::ExpandDecider *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ExpandDecider_release. Expected SWIGTYPE_p_Xapian__ExpandDecider");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::ExpandDecider *)((Xapian::ExpandDecider const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ExpandDecider, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ExpandDeciderAnd) {
  Xapian::ExpandDecider *arg1 = 0 ;
  Xapian::ExpandDecider *arg2 = 0 ;
  zval **args[2];
  Xapian::ExpandDeciderAnd *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0 || arg1 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of new_ExpandDeciderAnd. Expected SWIGTYPE_p_Xapian__ExpandDecider");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_ExpandDeciderAnd. Expected SWIGTYPE_p_Xapian__ExpandDecider");
    }
  }
  {
    try {
      result = (Xapian::ExpandDeciderAnd *)new Xapian::ExpandDeciderAnd((Xapian::ExpandDecider const &)*arg1,(Xapian::ExpandDecider const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ExpandDeciderAnd, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ExpandDeciderAnd_apply) {
  Xapian::ExpandDeciderAnd *arg1 = (Xapian::ExpandDeciderAnd *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ExpandDeciderAnd, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ExpandDeciderAnd_apply. Expected SWIGTYPE_p_Xapian__ExpandDeciderAnd");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (bool)((Xapian::ExpandDeciderAnd const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ExpandDeciderAnd(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ExpandDeciderAnd *arg1 = (Xapian::ExpandDeciderAnd *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ExpandDeciderAnd *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ExpandDeciderAnd TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ExpandDeciderAnd resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ExpandDeciderFilterPrefix) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::ExpandDeciderFilterPrefix *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::ExpandDeciderFilterPrefix *)new Xapian::ExpandDeciderFilterPrefix((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ExpandDeciderFilterPrefix_apply) {
  Xapian::ExpandDeciderFilterPrefix *arg1 = (Xapian::ExpandDeciderFilterPrefix *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ExpandDeciderFilterPrefix_apply. Expected SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (bool)((Xapian::ExpandDeciderFilterPrefix const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ExpandDeciderFilterPrefix(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ExpandDeciderFilterPrefix *arg1 = (Xapian::ExpandDeciderFilterPrefix *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ExpandDeciderFilterPrefix *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ExpandDeciderFilterPrefix resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_KeyMaker) {
  zval *arg0;
  zval **args[1];
  Xapian::KeyMaker *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        SWIG_PHP_Error(E_ERROR, "accessing abstract class or protected constructor");
      } else {
        result = (Xapian::KeyMaker *)new SwigDirector_KeyMaker(arg0 TSRMLS_CC);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__KeyMaker, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_KeyMaker_apply) {
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval **args[2];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__KeyMaker, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of KeyMaker_apply. Expected SWIGTYPE_p_Xapian__KeyMaker");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of KeyMaker_apply. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianKeyMaker", (char *)"operator ()" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::KeyMaker::operator ()" TSRMLS_CC);
      } else {
        result = ((Xapian::KeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_KeyMaker(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::KeyMaker *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__KeyMaker TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::KeyMaker resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_KeyMaker_release) {
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  zval **args[1];
  Xapian::KeyMaker *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__KeyMaker, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of KeyMaker_release. Expected SWIGTYPE_p_Xapian__KeyMaker");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::KeyMaker *)((Xapian::KeyMaker const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__KeyMaker, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_MultiValueKeyMaker) {
  Xapian::MultiValueKeyMaker *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::MultiValueKeyMaker *)new Xapian::MultiValueKeyMaker();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MultiValueKeyMaker_apply) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval **args[2];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MultiValueKeyMaker_apply. Expected SWIGTYPE_p_Xapian__MultiValueKeyMaker");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of MultiValueKeyMaker_apply. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  {
    try {
      result = ((Xapian::MultiValueKeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MultiValueKeyMaker_add_value__SWIG_0) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  std::string *arg4 = 0 ;
  std::string temp4 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MultiValueKeyMaker_add_value. Expected SWIGTYPE_p_Xapian__MultiValueKeyMaker");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[3]);
  temp4.assign(Z_STRVAL_PP(args[3]), Z_STRLEN_PP(args[3]));
  arg4 = &temp4;
  
  {
    try {
      (arg1)->add_value(arg2,arg3,(std::string const &)*arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MultiValueKeyMaker_add_value__SWIG_1) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MultiValueKeyMaker_add_value. Expected SWIGTYPE_p_Xapian__MultiValueKeyMaker");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_value(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MultiValueKeyMaker_add_value__SWIG_2) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::valueno arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MultiValueKeyMaker_add_value. Expected SWIGTYPE_p_Xapian__MultiValueKeyMaker");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_value(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MultiValueKeyMaker_add_value) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_MultiValueKeyMaker_add_value__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_BOOL || Z_TYPE_PP(argv[2]) == IS_LONG);
        }
        if (_v) {
          _wrap_MultiValueKeyMaker_add_value__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_BOOL || Z_TYPE_PP(argv[2]) == IS_LONG);
        }
        if (_v) {
          {
            _v = (Z_TYPE_PP(argv[3]) == IS_STRING);
          }
          if (_v) {
            _wrap_MultiValueKeyMaker_add_value__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'MultiValueKeyMaker_add_value'";
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_MultiValueKeyMaker(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::MultiValueKeyMaker *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__MultiValueKeyMaker TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::MultiValueKeyMaker resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Stopper) {
  zval *arg0;
  zval **args[1];
  Xapian::Stopper *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        SWIG_PHP_Error(E_ERROR, "accessing abstract class or protected constructor");
      } else {
        result = (Xapian::Stopper *)new SwigDirector_Stopper(arg0 TSRMLS_CC);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Stopper, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Stopper_apply) {
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  bool upcall = false;
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Stopper, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Stopper_apply. Expected SWIGTYPE_p_Xapian__Stopper");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianStopper", (char *)"operator ()" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::Stopper::operator ()" TSRMLS_CC);
      } else {
        result = (bool)((Xapian::Stopper const *)arg1)->operator ()((std::string const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Stopper(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::Stopper *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__Stopper TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::Stopper resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Stopper_get_description) {
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  zval **args[1];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Stopper, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Stopper_get_description. Expected SWIGTYPE_p_Xapian__Stopper");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianStopper", (char *)"get_description" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = ((Xapian::Stopper const *)arg1)->Xapian::Stopper::get_description();
      } else {
        result = ((Xapian::Stopper const *)arg1)->get_description();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Stopper_release) {
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  zval **args[1];
  Xapian::Stopper *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Stopper, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Stopper_release. Expected SWIGTYPE_p_Xapian__Stopper");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::Stopper *)((Xapian::Stopper const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Stopper, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_SimpleStopper__SWIG_0) {
  Xapian::SimpleStopper *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::SimpleStopper *)new Xapian::SimpleStopper();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__SimpleStopper, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_SimpleStopper_add) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__SimpleStopper, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SimpleStopper_add. Expected SWIGTYPE_p_Xapian__SimpleStopper");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->add((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_SimpleStopper_apply) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__SimpleStopper, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SimpleStopper_apply. Expected SWIGTYPE_p_Xapian__SimpleStopper");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (bool)((Xapian::SimpleStopper const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_SimpleStopper_get_description) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__SimpleStopper, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SimpleStopper_get_description. Expected SWIGTYPE_p_Xapian__SimpleStopper");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::SimpleStopper const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_SimpleStopper__SWIG_2) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::SimpleStopper *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::SimpleStopper *)new_Xapian_SimpleStopper__SWIG_2((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__SimpleStopper, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_SimpleStopper) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_SimpleStopper__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_SimpleStopper__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_SimpleStopper'";
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_SimpleStopper(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::SimpleStopper *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__SimpleStopper TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::SimpleStopper resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_RangeProcessor__SWIG_0) {
  zval *arg0;
  zval **args[1];
  Xapian::RangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor();
      } else {
        result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg0 TSRMLS_CC);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__RangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_RangeProcessor__SWIG_1) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  std::string temp2 ;
  zval *arg0;
  zval **args[4];
  Xapian::RangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[2]);
  temp2.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg3 = (unsigned int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor(arg1, (std::string const &)*arg2, arg3);
      } else {
        result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg0 TSRMLS_CC, arg1, (std::string const &)*arg2, arg3);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__RangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_RangeProcessor__SWIG_2) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval *arg0;
  zval **args[3];
  Xapian::RangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[2]);
  temp2.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg2 = &temp2;
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor(arg1, (std::string const &)*arg2);
      } else {
        result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg0 TSRMLS_CC, arg1, (std::string const &)*arg2);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__RangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_RangeProcessor__SWIG_3) {
  Xapian::valueno arg1 ;
  zval *arg0;
  zval **args[2];
  Xapian::RangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor(arg1);
      } else {
        result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg0 TSRMLS_CC, arg1);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__RangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_RangeProcessor) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    _wrap_new_RangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
    if (_v) {
      _wrap_new_RangeProcessor__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[2]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_RangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[2]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
        if (_v) {
          _wrap_new_RangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_RangeProcessor'";
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_RangeProcessor(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::RangeProcessor *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__RangeProcessor TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::RangeProcessor resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RangeProcessor_check_range) {
  Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RangeProcessor_check_range. Expected SWIGTYPE_p_Xapian__RangeProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = (arg1)->check_range((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RangeProcessor_apply) {
  Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  bool upcall = false;
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RangeProcessor_apply. Expected SWIGTYPE_p_Xapian__RangeProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianRangeProcessor", (char *)"operator ()" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (arg1)->Xapian::RangeProcessor::operator ()((std::string const &)*arg2,(std::string const &)*arg3);
      } else {
        result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_RangeProcessor_release) {
  Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
  zval **args[1];
  Xapian::RangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__RangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of RangeProcessor_release. Expected SWIGTYPE_p_Xapian__RangeProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::RangeProcessor *)((Xapian::RangeProcessor const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__RangeProcessor, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateRangeProcessor__SWIG_0) {
  Xapian::valueno arg1 ;
  unsigned int arg2 ;
  int arg3 ;
  zval **args[3];
  Xapian::DateRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (unsigned int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateRangeProcessor__SWIG_1) {
  Xapian::valueno arg1 ;
  unsigned int arg2 ;
  zval **args[2];
  Xapian::DateRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (unsigned int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateRangeProcessor__SWIG_2) {
  Xapian::valueno arg1 ;
  zval **args[1];
  Xapian::DateRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateRangeProcessor__SWIG_3) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  int arg4 ;
  std::string temp2 ;
  zval **args[4];
  Xapian::DateRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateRangeProcessor__SWIG_4) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  std::string temp2 ;
  zval **args[3];
  Xapian::DateRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateRangeProcessor__SWIG_5) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::DateRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateRangeProcessor) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _wrap_new_DateRangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_DateRangeProcessor__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_new_DateRangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_new_DateRangeProcessor__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_new_DateRangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_new_DateRangeProcessor__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_DateRangeProcessor'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DateRangeProcessor_apply) {
  Xapian::DateRangeProcessor *arg1 = (Xapian::DateRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DateRangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DateRangeProcessor_apply. Expected SWIGTYPE_p_Xapian__DateRangeProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_DateRangeProcessor(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::DateRangeProcessor *arg1 = (Xapian::DateRangeProcessor *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::DateRangeProcessor *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__DateRangeProcessor TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::DateRangeProcessor resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_NumberRangeProcessor__SWIG_0) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  std::string temp2 ;
  zval **args[3];
  Xapian::NumberRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__NumberRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_NumberRangeProcessor__SWIG_1) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::NumberRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__NumberRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_NumberRangeProcessor__SWIG_2) {
  Xapian::valueno arg1 ;
  zval **args[1];
  Xapian::NumberRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__NumberRangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_NumberRangeProcessor) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _wrap_new_NumberRangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_NumberRangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_new_NumberRangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_NumberRangeProcessor'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_NumberRangeProcessor_apply) {
  Xapian::NumberRangeProcessor *arg1 = (Xapian::NumberRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__NumberRangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of NumberRangeProcessor_apply. Expected SWIGTYPE_p_Xapian__NumberRangeProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_NumberRangeProcessor(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::NumberRangeProcessor *arg1 = (Xapian::NumberRangeProcessor *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::NumberRangeProcessor *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__NumberRangeProcessor TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::NumberRangeProcessor resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ValueRangeProcessor) {
  zval *arg0;
  zval **args[1];
  Xapian::ValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        SWIG_PHP_Error(E_ERROR, "accessing abstract class or protected constructor");
      } else {
        result = (Xapian::ValueRangeProcessor *)new SwigDirector_ValueRangeProcessor(arg0 TSRMLS_CC);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueRangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ValueRangeProcessor(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ValueRangeProcessor *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ValueRangeProcessor TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ValueRangeProcessor resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueRangeProcessor_apply) {
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  bool upcall = false;
  Xapian::valueno result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueRangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueRangeProcessor_apply. Expected SWIGTYPE_p_Xapian__ValueRangeProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValueRangeProcessor", (char *)"operator ()" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::ValueRangeProcessor::operator ()" TSRMLS_CC);
      } else {
        result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
  ZVAL_STRINGL(*(args[1]), const_cast<char*>(arg2->data()), arg2->size(), 1);
  
  
  ZVAL_STRINGL(*(args[2]), const_cast<char*>(arg3->data()), arg3->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueRangeProcessor_release) {
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  zval **args[1];
  Xapian::ValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueRangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueRangeProcessor_release. Expected SWIGTYPE_p_Xapian__ValueRangeProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::ValueRangeProcessor *)((Xapian::ValueRangeProcessor const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueRangeProcessor, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_StringValueRangeProcessor__SWIG_0) {
  Xapian::valueno arg1 ;
  zval **args[1];
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__StringValueRangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_StringValueRangeProcessor__SWIG_1) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  std::string temp2 ;
  zval **args[3];
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__StringValueRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_StringValueRangeProcessor__SWIG_2) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__StringValueRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_StringValueRangeProcessor) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _wrap_new_StringValueRangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_StringValueRangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_BOOL || Z_TYPE_PP(argv[2]) == IS_LONG);
        }
        if (_v) {
          _wrap_new_StringValueRangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_StringValueRangeProcessor'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_StringValueRangeProcessor_apply) {
  Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  Xapian::valueno result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__StringValueRangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of StringValueRangeProcessor_apply. Expected SWIGTYPE_p_Xapian__StringValueRangeProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
  ZVAL_STRINGL(*(args[1]), const_cast<char*>(arg2->data()), arg2->size(), 1);
  
  
  ZVAL_STRINGL(*(args[2]), const_cast<char*>(arg3->data()), arg3->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_StringValueRangeProcessor(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::StringValueRangeProcessor *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__StringValueRangeProcessor TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::StringValueRangeProcessor resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor__SWIG_0) {
  Xapian::valueno arg1 ;
  bool arg2 ;
  int arg3 ;
  zval **args[3];
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[1]);
  arg2 = (bool) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor__SWIG_1) {
  Xapian::valueno arg1 ;
  bool arg2 ;
  zval **args[2];
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[1]);
  arg2 = (bool) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor__SWIG_2) {
  Xapian::valueno arg1 ;
  zval **args[1];
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor__SWIG_3) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  bool arg4 ;
  int arg5 ;
  std::string temp2 ;
  zval **args[5];
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[3]);
  arg4 = (bool) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[4]);
  arg5 = (int) Z_LVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor__SWIG_4) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  bool arg4 ;
  std::string temp2 ;
  zval **args[4];
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[3]);
  arg4 = (bool) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor__SWIG_5) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  std::string temp2 ;
  zval **args[3];
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor__SWIG_6) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor) {
  int argc;
  zval **argv[5];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _wrap_new_DateValueRangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_DateValueRangeProcessor__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_BOOL || Z_TYPE_PP(argv[1]) == IS_LONG);
      }
      if (_v) {
        _wrap_new_DateValueRangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_BOOL || Z_TYPE_PP(argv[2]) == IS_LONG);
        }
        if (_v) {
          _wrap_new_DateValueRangeProcessor__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_BOOL || Z_TYPE_PP(argv[1]) == IS_LONG);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_new_DateValueRangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_BOOL || Z_TYPE_PP(argv[2]) == IS_LONG);
        }
        if (_v) {
          {
            _v = (Z_TYPE_PP(argv[3]) == IS_BOOL || Z_TYPE_PP(argv[3]) == IS_LONG);
          }
          if (_v) {
            _wrap_new_DateValueRangeProcessor__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_BOOL || Z_TYPE_PP(argv[2]) == IS_LONG);
        }
        if (_v) {
          {
            _v = (Z_TYPE_PP(argv[3]) == IS_BOOL || Z_TYPE_PP(argv[3]) == IS_LONG);
          }
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_LONG); 
            if (_v) {
              _wrap_new_DateValueRangeProcessor__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_DateValueRangeProcessor'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DateValueRangeProcessor_apply) {
  Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  Xapian::valueno result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DateValueRangeProcessor_apply. Expected SWIGTYPE_p_Xapian__DateValueRangeProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
  ZVAL_STRINGL(*(args[1]), const_cast<char*>(arg2->data()), arg2->size(), 1);
  
  
  ZVAL_STRINGL(*(args[2]), const_cast<char*>(arg3->data()), arg3->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_DateValueRangeProcessor(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::DateValueRangeProcessor *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__DateValueRangeProcessor TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::DateValueRangeProcessor resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_NumberValueRangeProcessor__SWIG_0) {
  Xapian::valueno arg1 ;
  zval **args[1];
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__NumberValueRangeProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_NumberValueRangeProcessor__SWIG_1) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  std::string temp2 ;
  zval **args[3];
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[2]);
  arg3 = (bool) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__NumberValueRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_NumberValueRangeProcessor__SWIG_2) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__NumberValueRangeProcessor, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_NumberValueRangeProcessor) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _wrap_new_NumberValueRangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_NumberValueRangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_BOOL || Z_TYPE_PP(argv[2]) == IS_LONG);
        }
        if (_v) {
          _wrap_new_NumberValueRangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_NumberValueRangeProcessor'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_NumberValueRangeProcessor_apply) {
  Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  Xapian::valueno result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__NumberValueRangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of NumberValueRangeProcessor_apply. Expected SWIGTYPE_p_Xapian__NumberValueRangeProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
  ZVAL_STRINGL(*(args[1]), const_cast<char*>(arg2->data()), arg2->size(), 1);
  
  
  ZVAL_STRINGL(*(args[2]), const_cast<char*>(arg3->data()), arg3->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_NumberValueRangeProcessor(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::NumberValueRangeProcessor *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__NumberValueRangeProcessor TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::NumberValueRangeProcessor resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_FieldProcessor) {
  zval *arg0;
  zval **args[1];
  Xapian::FieldProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        SWIG_PHP_Error(E_ERROR, "accessing abstract class or protected constructor");
      } else {
        result = (Xapian::FieldProcessor *)new SwigDirector_FieldProcessor(arg0 TSRMLS_CC);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__FieldProcessor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_FieldProcessor(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::FieldProcessor *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__FieldProcessor TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::FieldProcessor resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FieldProcessor_apply) {
  Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  bool upcall = false;
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FieldProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldProcessor_apply. Expected SWIGTYPE_p_Xapian__FieldProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianFieldProcessor", (char *)"operator ()" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::FieldProcessor::operator ()" TSRMLS_CC);
      } else {
        result = (arg1)->operator ()((std::string const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FieldProcessor_release) {
  Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
  zval **args[1];
  Xapian::FieldProcessor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FieldProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldProcessor_release. Expected SWIGTYPE_p_Xapian__FieldProcessor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::FieldProcessor *)((Xapian::FieldProcessor const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__FieldProcessor, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_QueryParser) {
  Xapian::QueryParser *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::QueryParser *)new Xapian::QueryParser();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__QueryParser, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_QueryParser(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::QueryParser *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__QueryParser TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::QueryParser resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_stemmer) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Stem *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_set_stemmer. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of QueryParser_set_stemmer. Expected SWIGTYPE_p_Xapian__Stem");
    }
  }
  {
    try {
      (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_stemming_strategy) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::QueryParser::stem_strategy arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_set_stemming_strategy. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::QueryParser::stem_strategy) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_stemming_strategy(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_stopper__SWIG_0) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_set_stopper. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Stopper, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of QueryParser_set_stopper. Expected SWIGTYPE_p_Xapian__Stopper");
    }
  }
  {
    try {
      (arg1)->set_stopper((Xapian::Stopper const *)arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_stopper__SWIG_1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_set_stopper. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->set_stopper();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_stopper) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      _wrap_QueryParser_set_stopper__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(*argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__Stopper, 0) >= 0);
      }
      if (_v) {
        _wrap_QueryParser_set_stopper__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'QueryParser_set_stopper'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_default_op) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Query::op arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_set_default_op. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::Query::op) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_default_op(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_get_default_op) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  zval **args[1];
  Xapian::Query::op result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_get_default_op. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::Query::op)((Xapian::QueryParser const *)arg1)->get_default_op();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_database) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_set_database. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of QueryParser_set_database. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  {
    try {
      (arg1)->set_database((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_max_expansion__SWIG_0) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::termcount arg2 ;
  int arg3 ;
  unsigned int arg4 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_set_max_expansion. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (unsigned int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_max_expansion(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_max_expansion__SWIG_1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::termcount arg2 ;
  int arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_set_max_expansion. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_max_expansion(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_max_expansion__SWIG_2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::termcount arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_set_max_expansion. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_max_expansion(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_max_expansion) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_QueryParser_set_max_expansion__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_QueryParser_set_max_expansion__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_QueryParser_set_max_expansion__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'QueryParser_set_max_expansion'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_max_wildcard_expansion) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::termcount arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_set_max_wildcard_expansion. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_max_wildcard_expansion(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_parse_query__SWIG_0) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  std::string *arg4 = 0 ;
  std::string temp2 ;
  std::string temp4 ;
  zval **args[4];
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_parse_query. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[3]);
  temp4.assign(Z_STRVAL_PP(args[3]), Z_STRLEN_PP(args[3]));
  arg4 = &temp4;
  
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_parse_query__SWIG_1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  std::string temp2 ;
  zval **args[3];
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_parse_query. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_parse_query__SWIG_2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::Query result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_parse_query. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query((const Xapian::Query &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_parse_query) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_QueryParser_parse_query__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_QueryParser_parse_query__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          {
            _v = (Z_TYPE_PP(argv[3]) == IS_STRING);
          }
          if (_v) {
            _wrap_QueryParser_parse_query__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'QueryParser_parse_query'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_prefix__SWIG_0) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_prefix. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      (arg1)->add_prefix((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_prefix__SWIG_1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_prefix. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__FieldProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of QueryParser_add_prefix. Expected SWIGTYPE_p_Xapian__FieldProcessor");
    }
  }
  {
    try {
      (arg1)->add_prefix((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_prefix) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(*argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__FieldProcessor, 0) >= 0);
        }
        if (_v) {
          _wrap_QueryParser_add_prefix__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_QueryParser_add_prefix__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'QueryParser_add_prefix'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_boolean_prefix__SWIG_0) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string *arg4 = (std::string *) 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_std__string, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_std__string");
    }
  }
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,(std::string const *)arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_boolean_prefix__SWIG_1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_boolean_prefix__SWIG_2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  bool arg4 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[3]);
  arg4 = (bool) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_boolean_prefix__SWIG_3) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
  std::string *arg4 = (std::string *) 0 ;
  std::string temp2 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__FieldProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_Xapian__FieldProcessor");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_std__string, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_std__string");
    }
  }
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3,(std::string const *)arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_boolean_prefix__SWIG_4) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__FieldProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_Xapian__FieldProcessor");
    }
  }
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_boolean_prefix__SWIG_5) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
  bool arg4 ;
  std::string temp2 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__FieldProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of QueryParser_add_boolean_prefix. Expected SWIGTYPE_p_Xapian__FieldProcessor");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[3]);
  arg4 = (bool) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_boolean_prefix) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(*argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__FieldProcessor, 0) >= 0);
        }
        if (_v) {
          _wrap_QueryParser_add_boolean_prefix__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_QueryParser_add_boolean_prefix__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(*argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__FieldProcessor, 0) >= 0);
        }
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(*argv[3], (void**)&tmp, SWIGTYPE_p_std__string, 0) >= 0);
          }
          if (_v) {
            _wrap_QueryParser_add_boolean_prefix__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(*argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__FieldProcessor, 0) >= 0);
        }
        if (_v) {
          {
            _v = (Z_TYPE_PP(argv[3]) == IS_BOOL || Z_TYPE_PP(argv[3]) == IS_LONG);
          }
          if (_v) {
            _wrap_QueryParser_add_boolean_prefix__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_STRING);
        }
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(*argv[3], (void**)&tmp, SWIGTYPE_p_std__string, 0) >= 0);
          }
          if (_v) {
            _wrap_QueryParser_add_boolean_prefix__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_STRING);
        }
        if (_v) {
          {
            _v = (Z_TYPE_PP(argv[3]) == IS_BOOL || Z_TYPE_PP(argv[3]) == IS_LONG);
          }
          if (_v) {
            _wrap_QueryParser_add_boolean_prefix__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'QueryParser_add_boolean_prefix'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_stoplist_begin) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_stoplist_begin. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->stoplist_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_stoplist_end) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_stoplist_end. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::QueryParser const *)arg1)->stoplist_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_unstem_begin) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_unstem_begin. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->unstem_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_unstem_end) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_unstem_end. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  result = ((Xapian::QueryParser const *)arg1)->unstem_end((std::string const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_rangeprocessor__SWIG_0) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::RangeProcessor *arg2 = (Xapian::RangeProcessor *) 0 ;
  std::string *arg3 = (std::string *) 0 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_rangeprocessor. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__RangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of QueryParser_add_rangeprocessor. Expected SWIGTYPE_p_Xapian__RangeProcessor");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_std__string, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of QueryParser_add_rangeprocessor. Expected SWIGTYPE_p_std__string");
    }
  }
  {
    try {
      (arg1)->add_rangeprocessor(arg2,(std::string const *)arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_rangeprocessor__SWIG_1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::RangeProcessor *arg2 = (Xapian::RangeProcessor *) 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_rangeprocessor. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__RangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of QueryParser_add_rangeprocessor. Expected SWIGTYPE_p_Xapian__RangeProcessor");
    }
  }
  {
    try {
      (arg1)->add_rangeprocessor(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_rangeprocessor) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(*argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__RangeProcessor, 0) >= 0);
      }
      if (_v) {
        _wrap_QueryParser_add_rangeprocessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__QueryParser, 0) >= 0);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(*argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__RangeProcessor, 0) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(*argv[2], (void**)&tmp, SWIGTYPE_p_std__string, 0) >= 0);
        }
        if (_v) {
          _wrap_QueryParser_add_rangeprocessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'QueryParser_add_rangeprocessor'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_valuerangeprocessor) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::ValueRangeProcessor *arg2 = (Xapian::ValueRangeProcessor *) 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_add_valuerangeprocessor. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__ValueRangeProcessor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of QueryParser_add_valuerangeprocessor. Expected SWIGTYPE_p_Xapian__ValueRangeProcessor");
    }
  }
  {
    try {
      (arg1)->add_valuerangeprocessor(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_get_corrected_query_string) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_get_corrected_query_string. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->get_corrected_query_string();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_QueryParser_get_description) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__QueryParser, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of QueryParser_get_description. Expected SWIGTYPE_p_Xapian__QueryParser");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_sortable_serialise) {
  double arg1 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::sortable_serialise(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_sortable_unserialise) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (double)Xapian::sortable_unserialise((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ValueSetMatchDecider) {
  Xapian::valueno arg1 ;
  bool arg2 ;
  zval **args[2];
  Xapian::ValueSetMatchDecider *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[1]);
  arg2 = (bool) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::ValueSetMatchDecider *)new Xapian::ValueSetMatchDecider(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueSetMatchDecider, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueSetMatchDecider_add_value) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueSetMatchDecider_add_value. Expected SWIGTYPE_p_Xapian__ValueSetMatchDecider");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->add_value((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueSetMatchDecider_remove_value) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueSetMatchDecider_remove_value. Expected SWIGTYPE_p_Xapian__ValueSetMatchDecider");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->remove_value((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueSetMatchDecider_apply) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueSetMatchDecider_apply. Expected SWIGTYPE_p_Xapian__ValueSetMatchDecider");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of ValueSetMatchDecider_apply. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  {
    try {
      result = (bool)((Xapian::ValueSetMatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ValueSetMatchDecider(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ValueSetMatchDecider *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ValueSetMatchDecider TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ValueSetMatchDecider resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Weight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::Weight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__Weight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::Weight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Weight_name) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Weight_name. Expected SWIGTYPE_p_Xapian__Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Weight_get_sumpart) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Weight_get_sumpart. Expected SWIGTYPE_p_Xapian__Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Weight_get_maxpart) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Weight_get_maxpart. Expected SWIGTYPE_p_Xapian__Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Weight_get_sumextra) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Weight_get_sumextra. Expected SWIGTYPE_p_Xapian__Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Weight_get_maxextra) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Weight_get_maxextra. Expected SWIGTYPE_p_Xapian__Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_BoolWeight) {
  Xapian::BoolWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::BoolWeight *)new Xapian::BoolWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__BoolWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BoolWeight_name) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BoolWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BoolWeight_name. Expected SWIGTYPE_p_Xapian__BoolWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::BoolWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BoolWeight_get_sumpart) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BoolWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BoolWeight_get_sumpart. Expected SWIGTYPE_p_Xapian__BoolWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BoolWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BoolWeight_get_maxpart) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BoolWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BoolWeight_get_maxpart. Expected SWIGTYPE_p_Xapian__BoolWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::BoolWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BoolWeight_get_sumextra) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BoolWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BoolWeight_get_sumextra. Expected SWIGTYPE_p_Xapian__BoolWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BoolWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BoolWeight_get_maxextra) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BoolWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BoolWeight_get_maxextra. Expected SWIGTYPE_p_Xapian__BoolWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::BoolWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_BoolWeight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::BoolWeight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__BoolWeight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::BoolWeight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_TfIdfWeight__SWIG_0) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::TfIdfWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::TfIdfWeight *)new Xapian::TfIdfWeight((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__TfIdfWeight, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_TfIdfWeight__SWIG_1) {
  Xapian::TfIdfWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::TfIdfWeight *)new Xapian::TfIdfWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__TfIdfWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_TfIdfWeight) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_TfIdfWeight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_TfIdfWeight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_TfIdfWeight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TfIdfWeight_name) {
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TfIdfWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TfIdfWeight_name. Expected SWIGTYPE_p_Xapian__TfIdfWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::TfIdfWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TfIdfWeight_get_sumpart) {
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TfIdfWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TfIdfWeight_get_sumpart. Expected SWIGTYPE_p_Xapian__TfIdfWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::TfIdfWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TfIdfWeight_get_maxpart) {
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TfIdfWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TfIdfWeight_get_maxpart. Expected SWIGTYPE_p_Xapian__TfIdfWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::TfIdfWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TfIdfWeight_get_sumextra) {
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TfIdfWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TfIdfWeight_get_sumextra. Expected SWIGTYPE_p_Xapian__TfIdfWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::TfIdfWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TfIdfWeight_get_maxextra) {
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TfIdfWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TfIdfWeight_get_maxextra. Expected SWIGTYPE_p_Xapian__TfIdfWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::TfIdfWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_TfIdfWeight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::TfIdfWeight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__TfIdfWeight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::TfIdfWeight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_BM25Weight__SWIG_0) {
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  zval **args[5];
  Xapian::BM25Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::BM25Weight *)new Xapian::BM25Weight(arg1,arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__BM25Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_BM25Weight__SWIG_1) {
  Xapian::BM25Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::BM25Weight *)new Xapian::BM25Weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__BM25Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_BM25Weight) {
  int argc;
  zval **argv[5];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_BM25Weight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 5) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_DOUBLE); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_DOUBLE); 
            if (_v) {
              _wrap_new_BM25Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_BM25Weight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BM25Weight_name) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BM25Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BM25Weight_name. Expected SWIGTYPE_p_Xapian__BM25Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::BM25Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BM25Weight_get_sumpart) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BM25Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BM25Weight_get_sumpart. Expected SWIGTYPE_p_Xapian__BM25Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BM25Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BM25Weight_get_maxpart) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BM25Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BM25Weight_get_maxpart. Expected SWIGTYPE_p_Xapian__BM25Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::BM25Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BM25Weight_get_sumextra) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BM25Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BM25Weight_get_sumextra. Expected SWIGTYPE_p_Xapian__BM25Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BM25Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BM25Weight_get_maxextra) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BM25Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BM25Weight_get_maxextra. Expected SWIGTYPE_p_Xapian__BM25Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::BM25Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_BM25Weight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::BM25Weight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__BM25Weight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::BM25Weight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_BM25PlusWeight__SWIG_0) {
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  Xapian::BM25PlusWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::BM25PlusWeight *)new Xapian::BM25PlusWeight(arg1,arg2,arg3,arg4,arg5,arg6);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__BM25PlusWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_BM25PlusWeight__SWIG_1) {
  Xapian::BM25PlusWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::BM25PlusWeight *)new Xapian::BM25PlusWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__BM25PlusWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_BM25PlusWeight) {
  int argc;
  zval **argv[6];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_BM25PlusWeight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 6) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_DOUBLE); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_DOUBLE); 
            if (_v) {
              _v = (Z_TYPE_PP(argv[5]) == IS_DOUBLE); 
              if (_v) {
                _wrap_new_BM25PlusWeight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
              }
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_BM25PlusWeight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BM25PlusWeight_name) {
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BM25PlusWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BM25PlusWeight_name. Expected SWIGTYPE_p_Xapian__BM25PlusWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::BM25PlusWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BM25PlusWeight_get_sumpart) {
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BM25PlusWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BM25PlusWeight_get_sumpart. Expected SWIGTYPE_p_Xapian__BM25PlusWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BM25PlusWeight_get_maxpart) {
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BM25PlusWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BM25PlusWeight_get_maxpart. Expected SWIGTYPE_p_Xapian__BM25PlusWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BM25PlusWeight_get_sumextra) {
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BM25PlusWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BM25PlusWeight_get_sumextra. Expected SWIGTYPE_p_Xapian__BM25PlusWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BM25PlusWeight_get_maxextra) {
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BM25PlusWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BM25PlusWeight_get_maxextra. Expected SWIGTYPE_p_Xapian__BM25PlusWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_BM25PlusWeight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::BM25PlusWeight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__BM25PlusWeight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::BM25PlusWeight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_TradWeight__SWIG_0) {
  double arg1 ;
  zval **args[1];
  Xapian::TradWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::TradWeight *)new Xapian::TradWeight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__TradWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_TradWeight__SWIG_1) {
  Xapian::TradWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::TradWeight *)new Xapian::TradWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__TradWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_TradWeight) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_TradWeight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _wrap_new_TradWeight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_TradWeight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TradWeight_name) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TradWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TradWeight_name. Expected SWIGTYPE_p_Xapian__TradWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::TradWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TradWeight_get_sumpart) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TradWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TradWeight_get_sumpart. Expected SWIGTYPE_p_Xapian__TradWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::TradWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TradWeight_get_maxpart) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TradWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TradWeight_get_maxpart. Expected SWIGTYPE_p_Xapian__TradWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::TradWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TradWeight_get_sumextra) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TradWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TradWeight_get_sumextra. Expected SWIGTYPE_p_Xapian__TradWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::TradWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_TradWeight_get_maxextra) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__TradWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of TradWeight_get_maxextra. Expected SWIGTYPE_p_Xapian__TradWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::TradWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_TradWeight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::TradWeight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__TradWeight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::TradWeight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_InL2Weight__SWIG_0) {
  double arg1 ;
  zval **args[1];
  Xapian::InL2Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::InL2Weight *)new Xapian::InL2Weight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__InL2Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_InL2Weight__SWIG_1) {
  Xapian::InL2Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::InL2Weight *)new Xapian::InL2Weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__InL2Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_InL2Weight) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_InL2Weight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _wrap_new_InL2Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_InL2Weight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_InL2Weight_name) {
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__InL2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of InL2Weight_name. Expected SWIGTYPE_p_Xapian__InL2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::InL2Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_InL2Weight_get_sumpart) {
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__InL2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of InL2Weight_get_sumpart. Expected SWIGTYPE_p_Xapian__InL2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::InL2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_InL2Weight_get_maxpart) {
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__InL2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of InL2Weight_get_maxpart. Expected SWIGTYPE_p_Xapian__InL2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::InL2Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_InL2Weight_get_sumextra) {
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__InL2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of InL2Weight_get_sumextra. Expected SWIGTYPE_p_Xapian__InL2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::InL2Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_InL2Weight_get_maxextra) {
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__InL2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of InL2Weight_get_maxextra. Expected SWIGTYPE_p_Xapian__InL2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::InL2Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_InL2Weight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::InL2Weight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__InL2Weight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::InL2Weight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_IfB2Weight__SWIG_0) {
  double arg1 ;
  zval **args[1];
  Xapian::IfB2Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::IfB2Weight *)new Xapian::IfB2Weight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__IfB2Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_IfB2Weight__SWIG_1) {
  Xapian::IfB2Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::IfB2Weight *)new Xapian::IfB2Weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__IfB2Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_IfB2Weight) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_IfB2Weight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _wrap_new_IfB2Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_IfB2Weight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_IfB2Weight_name) {
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__IfB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of IfB2Weight_name. Expected SWIGTYPE_p_Xapian__IfB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::IfB2Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_IfB2Weight_get_sumpart) {
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__IfB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of IfB2Weight_get_sumpart. Expected SWIGTYPE_p_Xapian__IfB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::IfB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_IfB2Weight_get_maxpart) {
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__IfB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of IfB2Weight_get_maxpart. Expected SWIGTYPE_p_Xapian__IfB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::IfB2Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_IfB2Weight_get_sumextra) {
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__IfB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of IfB2Weight_get_sumextra. Expected SWIGTYPE_p_Xapian__IfB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::IfB2Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_IfB2Weight_get_maxextra) {
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__IfB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of IfB2Weight_get_maxextra. Expected SWIGTYPE_p_Xapian__IfB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::IfB2Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_IfB2Weight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::IfB2Weight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__IfB2Weight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::IfB2Weight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_IneB2Weight__SWIG_0) {
  double arg1 ;
  zval **args[1];
  Xapian::IneB2Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::IneB2Weight *)new Xapian::IneB2Weight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__IneB2Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_IneB2Weight__SWIG_1) {
  Xapian::IneB2Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::IneB2Weight *)new Xapian::IneB2Weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__IneB2Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_IneB2Weight) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_IneB2Weight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _wrap_new_IneB2Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_IneB2Weight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_IneB2Weight_name) {
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__IneB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of IneB2Weight_name. Expected SWIGTYPE_p_Xapian__IneB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::IneB2Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_IneB2Weight_get_sumpart) {
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__IneB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of IneB2Weight_get_sumpart. Expected SWIGTYPE_p_Xapian__IneB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::IneB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_IneB2Weight_get_maxpart) {
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__IneB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of IneB2Weight_get_maxpart. Expected SWIGTYPE_p_Xapian__IneB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::IneB2Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_IneB2Weight_get_sumextra) {
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__IneB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of IneB2Weight_get_sumextra. Expected SWIGTYPE_p_Xapian__IneB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::IneB2Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_IneB2Weight_get_maxextra) {
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__IneB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of IneB2Weight_get_maxextra. Expected SWIGTYPE_p_Xapian__IneB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::IneB2Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_IneB2Weight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::IneB2Weight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__IneB2Weight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::IneB2Weight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_BB2Weight__SWIG_0) {
  double arg1 ;
  zval **args[1];
  Xapian::BB2Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::BB2Weight *)new Xapian::BB2Weight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__BB2Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_BB2Weight__SWIG_1) {
  Xapian::BB2Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::BB2Weight *)new Xapian::BB2Weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__BB2Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_BB2Weight) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_BB2Weight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _wrap_new_BB2Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_BB2Weight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BB2Weight_name) {
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BB2Weight_name. Expected SWIGTYPE_p_Xapian__BB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::BB2Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BB2Weight_get_sumpart) {
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BB2Weight_get_sumpart. Expected SWIGTYPE_p_Xapian__BB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BB2Weight_get_maxpart) {
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BB2Weight_get_maxpart. Expected SWIGTYPE_p_Xapian__BB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::BB2Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BB2Weight_get_sumextra) {
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BB2Weight_get_sumextra. Expected SWIGTYPE_p_Xapian__BB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BB2Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BB2Weight_get_maxextra) {
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__BB2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BB2Weight_get_maxextra. Expected SWIGTYPE_p_Xapian__BB2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::BB2Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_BB2Weight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::BB2Weight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__BB2Weight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::BB2Weight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DLHWeight) {
  Xapian::DLHWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::DLHWeight *)new Xapian::DLHWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DLHWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DLHWeight_name) {
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DLHWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DLHWeight_name. Expected SWIGTYPE_p_Xapian__DLHWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::DLHWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DLHWeight_get_sumpart) {
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DLHWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DLHWeight_get_sumpart. Expected SWIGTYPE_p_Xapian__DLHWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::DLHWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DLHWeight_get_maxpart) {
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DLHWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DLHWeight_get_maxpart. Expected SWIGTYPE_p_Xapian__DLHWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::DLHWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DLHWeight_get_sumextra) {
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DLHWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DLHWeight_get_sumextra. Expected SWIGTYPE_p_Xapian__DLHWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::DLHWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DLHWeight_get_maxextra) {
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DLHWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DLHWeight_get_maxextra. Expected SWIGTYPE_p_Xapian__DLHWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::DLHWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_DLHWeight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::DLHWeight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__DLHWeight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::DLHWeight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_PL2Weight__SWIG_0) {
  double arg1 ;
  zval **args[1];
  Xapian::PL2Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::PL2Weight *)new Xapian::PL2Weight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PL2Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_PL2Weight__SWIG_1) {
  Xapian::PL2Weight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::PL2Weight *)new Xapian::PL2Weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PL2Weight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_PL2Weight) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_PL2Weight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _wrap_new_PL2Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_PL2Weight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PL2Weight_name) {
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PL2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PL2Weight_name. Expected SWIGTYPE_p_Xapian__PL2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::PL2Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PL2Weight_get_sumpart) {
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PL2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PL2Weight_get_sumpart. Expected SWIGTYPE_p_Xapian__PL2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::PL2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PL2Weight_get_maxpart) {
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PL2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PL2Weight_get_maxpart. Expected SWIGTYPE_p_Xapian__PL2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::PL2Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PL2Weight_get_sumextra) {
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PL2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PL2Weight_get_sumextra. Expected SWIGTYPE_p_Xapian__PL2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::PL2Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PL2Weight_get_maxextra) {
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PL2Weight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PL2Weight_get_maxextra. Expected SWIGTYPE_p_Xapian__PL2Weight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::PL2Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_PL2Weight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::PL2Weight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__PL2Weight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::PL2Weight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_PL2PlusWeight__SWIG_0) {
  double arg1 ;
  double arg2 ;
  zval **args[2];
  Xapian::PL2PlusWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::PL2PlusWeight *)new Xapian::PL2PlusWeight(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PL2PlusWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_PL2PlusWeight__SWIG_1) {
  Xapian::PL2PlusWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::PL2PlusWeight *)new Xapian::PL2PlusWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PL2PlusWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_PL2PlusWeight) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_PL2PlusWeight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_DOUBLE); 
      if (_v) {
        _wrap_new_PL2PlusWeight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_PL2PlusWeight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PL2PlusWeight_name) {
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PL2PlusWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PL2PlusWeight_name. Expected SWIGTYPE_p_Xapian__PL2PlusWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::PL2PlusWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PL2PlusWeight_get_sumpart) {
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PL2PlusWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PL2PlusWeight_get_sumpart. Expected SWIGTYPE_p_Xapian__PL2PlusWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PL2PlusWeight_get_maxpart) {
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PL2PlusWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PL2PlusWeight_get_maxpart. Expected SWIGTYPE_p_Xapian__PL2PlusWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PL2PlusWeight_get_sumextra) {
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PL2PlusWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PL2PlusWeight_get_sumextra. Expected SWIGTYPE_p_Xapian__PL2PlusWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PL2PlusWeight_get_maxextra) {
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PL2PlusWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PL2PlusWeight_get_maxextra. Expected SWIGTYPE_p_Xapian__PL2PlusWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_PL2PlusWeight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::PL2PlusWeight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__PL2PlusWeight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::PL2PlusWeight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DPHWeight) {
  Xapian::DPHWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::DPHWeight *)new Xapian::DPHWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DPHWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DPHWeight_name) {
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DPHWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DPHWeight_name. Expected SWIGTYPE_p_Xapian__DPHWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::DPHWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DPHWeight_get_sumpart) {
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DPHWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DPHWeight_get_sumpart. Expected SWIGTYPE_p_Xapian__DPHWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::DPHWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DPHWeight_get_maxpart) {
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DPHWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DPHWeight_get_maxpart. Expected SWIGTYPE_p_Xapian__DPHWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::DPHWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DPHWeight_get_sumextra) {
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DPHWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DPHWeight_get_sumextra. Expected SWIGTYPE_p_Xapian__DPHWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::DPHWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DPHWeight_get_maxextra) {
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DPHWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DPHWeight_get_maxextra. Expected SWIGTYPE_p_Xapian__DPHWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::DPHWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_DPHWeight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::DPHWeight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__DPHWeight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::DPHWeight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LMWeight__SWIG_0) {
  double arg1 ;
  Xapian::Weight::type_smoothing arg2 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  Xapian::LMWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::Weight::type_smoothing) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LMWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LMWeight__SWIG_1) {
  double arg1 ;
  Xapian::Weight::type_smoothing arg2 ;
  double arg3 ;
  zval **args[3];
  Xapian::LMWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::Weight::type_smoothing) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LMWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LMWeight__SWIG_2) {
  double arg1 ;
  Xapian::Weight::type_smoothing arg2 ;
  zval **args[2];
  Xapian::LMWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::Weight::type_smoothing) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LMWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LMWeight__SWIG_3) {
  double arg1 ;
  zval **args[1];
  Xapian::LMWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LMWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LMWeight__SWIG_4) {
  Xapian::LMWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::LMWeight *)new Xapian::LMWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LMWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LMWeight) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_LMWeight__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _wrap_new_LMWeight__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_new_LMWeight__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          _wrap_new_LMWeight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            _wrap_new_LMWeight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_LMWeight'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LMWeight_name) {
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LMWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LMWeight_name. Expected SWIGTYPE_p_Xapian__LMWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::LMWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LMWeight_get_sumpart) {
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LMWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LMWeight_get_sumpart. Expected SWIGTYPE_p_Xapian__LMWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::LMWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LMWeight_get_maxpart) {
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LMWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LMWeight_get_maxpart. Expected SWIGTYPE_p_Xapian__LMWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::LMWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LMWeight_get_sumextra) {
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LMWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LMWeight_get_sumextra. Expected SWIGTYPE_p_Xapian__LMWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::LMWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LMWeight_get_maxextra) {
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LMWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LMWeight_get_maxextra. Expected SWIGTYPE_p_Xapian__LMWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::LMWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_LMWeight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::LMWeight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__LMWeight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::LMWeight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_CoordWeight_init) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  double arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__CoordWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of CoordWeight_init. Expected SWIGTYPE_p_Xapian__CoordWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->init(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_CoordWeight) {
  Xapian::CoordWeight *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::CoordWeight *)new Xapian::CoordWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__CoordWeight, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_CoordWeight_name) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__CoordWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of CoordWeight_name. Expected SWIGTYPE_p_Xapian__CoordWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::CoordWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_CoordWeight_get_sumpart) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__CoordWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of CoordWeight_get_sumpart. Expected SWIGTYPE_p_Xapian__CoordWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (Xapian::termcount) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::CoordWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_CoordWeight_get_maxpart) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__CoordWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of CoordWeight_get_maxpart. Expected SWIGTYPE_p_Xapian__CoordWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::CoordWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_CoordWeight_get_sumextra) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__CoordWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of CoordWeight_get_sumextra. Expected SWIGTYPE_p_Xapian__CoordWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::termcount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::CoordWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_CoordWeight_get_maxextra) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__CoordWeight, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of CoordWeight_get_maxextra. Expected SWIGTYPE_p_Xapian__CoordWeight");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::CoordWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_CoordWeight(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::CoordWeight *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__CoordWeight TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::CoordWeight resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Compactor) {
  zval *arg0;
  zval **args[1];
  Xapian::Compactor *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        result = (Xapian::Compactor *)new Xapian::Compactor();
      } else {
        result = (Xapian::Compactor *)new SwigDirector_Compactor(arg0 TSRMLS_CC);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Compactor, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Compactor(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::Compactor *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__Compactor TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::Compactor resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Compactor_set_block_size) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  size_t arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Compactor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Compactor_set_block_size. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (size_t) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_block_size(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Compactor_set_renumber) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  bool arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Compactor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Compactor_set_renumber. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[1]);
  arg2 = (bool) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_renumber(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Compactor_set_multipass) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  bool arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Compactor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Compactor_set_multipass. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[1]);
  arg2 = (bool) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_multipass(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Compactor_set_compaction_level) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  Xapian::Compactor::compaction_level arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Compactor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Compactor_set_compaction_level. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::Compactor::compaction_level) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_compaction_level(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Compactor_set_destdir) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Compactor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Compactor_set_destdir. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->set_destdir((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Compactor_add_source) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Compactor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Compactor_add_source. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->add_source((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Compactor_compact) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Compactor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Compactor_compact. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->compact();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Compactor_set_status) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  bool upcall = false;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Compactor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Compactor_set_status. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianCompactor", (char *)"set_status" TSRMLS_CC);
  {
    try {
      if (upcall) {
        (arg1)->Xapian::Compactor::set_status((std::string const &)*arg2,(std::string const &)*arg3);
      } else {
        (arg1)->set_status((std::string const &)*arg2,(std::string const &)*arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Compactor_resolve_duplicate_metadata) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  std::string *arg4 ;
  std::string temp2 ;
  zval **args[4];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Compactor, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Compactor_resolve_duplicate_metadata. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (size_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_std__string, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of Compactor_resolve_duplicate_metadata. Expected SWIGTYPE_p_std__string");
    }
  }
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianCompactor", (char *)"resolve_duplicate_metadata" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (arg1)->Xapian::Compactor::resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4);
      } else {
        result = (arg1)->resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_PostingSource) {
  zval *arg0;
  zval **args[1];
  Xapian::PostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  if ( arg0->type == IS_NULL ) {
    /* not subclassed */
    SWIG_PHP_Error(E_ERROR, "accessing abstract class or protected constructor");
  } else {
    result = (Xapian::PostingSource *)new SwigDirector_PostingSource(arg0 TSRMLS_CC);
  }
  
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_PostingSource(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::PostingSource *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__PostingSource TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::PostingSource resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_get_termfreq_min) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_get_termfreq_min. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"get_termfreq_min" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_min" TSRMLS_CC);
      } else {
        result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_min();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_get_termfreq_est) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_get_termfreq_est. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"get_termfreq_est" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_est" TSRMLS_CC);
      } else {
        result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_est();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_get_termfreq_max) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_get_termfreq_max. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"get_termfreq_max" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_max" TSRMLS_CC);
      } else {
        result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_max();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_set_maxweight) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  double arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_set_maxweight. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_maxweight(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_get_maxweight) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_get_maxweight. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (double)((Xapian::PostingSource const *)arg1)->get_maxweight();
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_get_weight) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_get_weight. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"get_weight" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (double)((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::get_weight();
      } else {
        result = (double)((Xapian::PostingSource const *)arg1)->get_weight();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_get_docid) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_get_docid. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"get_docid" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_docid" TSRMLS_CC);
      } else {
        result = (Xapian::docid)((Xapian::PostingSource const *)arg1)->get_docid();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_next) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  double arg2 ;
  zval **args[2];
  bool upcall = false;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_next. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"next" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::next" TSRMLS_CC);
      } else {
        (arg1)->next(arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_skip_to) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval **args[3];
  bool upcall = false;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_skip_to. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"skip_to" TSRMLS_CC);
  {
    try {
      if (upcall) {
        (arg1)->Xapian::PostingSource::skip_to(arg2,arg3);
      } else {
        (arg1)->skip_to(arg2,arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_check) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval **args[3];
  bool upcall = false;
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_check. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"check" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (bool)(arg1)->Xapian::PostingSource::check(arg2,arg3);
      } else {
        result = (bool)(arg1)->check(arg2,arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_at_end) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_at_end. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"at_end" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::at_end" TSRMLS_CC);
      } else {
        result = (bool)((Xapian::PostingSource const *)arg1)->at_end();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_name) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_name. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"name" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = ((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::name();
      } else {
        result = ((Xapian::PostingSource const *)arg1)->name();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_init) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval **args[2];
  bool upcall = false;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_init. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of PostingSource_init. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"init" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::init" TSRMLS_CC);
      } else {
        (arg1)->init((Xapian::Database const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_get_description) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_get_description. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianPostingSource", (char *)"get_description" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = ((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::get_description();
      } else {
        result = ((Xapian::PostingSource const *)arg1)->get_description();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_PostingSource_release) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval **args[1];
  Xapian::PostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__PostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of PostingSource_release. Expected SWIGTYPE_p_Xapian__PostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::PostingSource *)((Xapian::PostingSource const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PostingSource, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ValuePostingSource) {
  Xapian::valueno arg1 ;
  zval *arg0;
  zval **args[2];
  Xapian::ValuePostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        result = (Xapian::ValuePostingSource *)new Xapian::ValuePostingSource(arg1);
      } else {
        result = (Xapian::ValuePostingSource *)new SwigDirector_ValuePostingSource(arg0 TSRMLS_CC, arg1);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValuePostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_get_termfreq_min) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_get_termfreq_min. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValuePostingSource", (char *)"get_termfreq_min" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->Xapian::ValuePostingSource::get_termfreq_min();
      } else {
        result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_min();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_get_termfreq_est) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_get_termfreq_est. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValuePostingSource", (char *)"get_termfreq_est" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->Xapian::ValuePostingSource::get_termfreq_est();
      } else {
        result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_est();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_get_termfreq_max) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_get_termfreq_max. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValuePostingSource", (char *)"get_termfreq_max" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->Xapian::ValuePostingSource::get_termfreq_max();
      } else {
        result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_max();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_next) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  double arg2 ;
  zval **args[2];
  bool upcall = false;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_next. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValuePostingSource", (char *)"next" TSRMLS_CC);
  {
    try {
      if (upcall) {
        (arg1)->Xapian::ValuePostingSource::next(arg2);
      } else {
        (arg1)->next(arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_skip_to) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval **args[3];
  bool upcall = false;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_skip_to. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValuePostingSource", (char *)"skip_to" TSRMLS_CC);
  {
    try {
      if (upcall) {
        (arg1)->Xapian::ValuePostingSource::skip_to(arg2,arg3);
      } else {
        (arg1)->skip_to(arg2,arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_check) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval **args[3];
  bool upcall = false;
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_check. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValuePostingSource", (char *)"check" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (bool)(arg1)->Xapian::ValuePostingSource::check(arg2,arg3);
      } else {
        result = (bool)(arg1)->check(arg2,arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_at_end) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_at_end. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValuePostingSource", (char *)"at_end" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (bool)((Xapian::ValuePostingSource const *)arg1)->Xapian::ValuePostingSource::at_end();
      } else {
        result = (bool)((Xapian::ValuePostingSource const *)arg1)->at_end();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_get_docid) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_get_docid. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValuePostingSource", (char *)"get_docid" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (Xapian::docid)((Xapian::ValuePostingSource const *)arg1)->Xapian::ValuePostingSource::get_docid();
      } else {
        result = (Xapian::docid)((Xapian::ValuePostingSource const *)arg1)->get_docid();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_init) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval **args[2];
  bool upcall = false;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_init. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of ValuePostingSource_init. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValuePostingSource", (char *)"init" TSRMLS_CC);
  {
    try {
      if (upcall) {
        (arg1)->Xapian::ValuePostingSource::init((Xapian::Database const &)*arg2);
      } else {
        (arg1)->init((Xapian::Database const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_get_database) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  zval **args[1];
  Xapian::Database result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_get_database. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ValuePostingSource const *)arg1)->get_database();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database((const Xapian::Database &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_get_slot) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  zval **args[1];
  Xapian::valueno result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_get_slot. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::valueno)((Xapian::ValuePostingSource const *)arg1)->get_slot();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_get_value) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_get_value. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ValuePostingSource const *)arg1)->get_value();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_done) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_done. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->done();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_get_started) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_get_started. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (bool)((Xapian::ValuePostingSource const *)arg1)->get_started();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_set_termfreq_min) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::doccount arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_set_termfreq_min. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_termfreq_min(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_set_termfreq_est) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::doccount arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_set_termfreq_est. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_termfreq_est(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValuePostingSource_set_termfreq_max) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::doccount arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValuePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValuePostingSource_set_termfreq_max. Expected SWIGTYPE_p_Xapian__ValuePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::doccount) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_termfreq_max(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ValuePostingSource(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ValuePostingSource *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ValuePostingSource TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ValuePostingSource resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ValueWeightPostingSource) {
  Xapian::valueno arg1 ;
  zval *arg0;
  zval **args[2];
  Xapian::ValueWeightPostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        result = (Xapian::ValueWeightPostingSource *)new Xapian::ValueWeightPostingSource(arg1);
      } else {
        result = (Xapian::ValueWeightPostingSource *)new SwigDirector_ValueWeightPostingSource(arg0 TSRMLS_CC, arg1);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueWeightPostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueWeightPostingSource_get_weight) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueWeightPostingSource_get_weight. Expected SWIGTYPE_p_Xapian__ValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValueWeightPostingSource", (char *)"get_weight" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = (double)((Xapian::ValueWeightPostingSource const *)arg1)->Xapian::ValueWeightPostingSource::get_weight();
      } else {
        result = (double)((Xapian::ValueWeightPostingSource const *)arg1)->get_weight();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueWeightPostingSource_name) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueWeightPostingSource_name. Expected SWIGTYPE_p_Xapian__ValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValueWeightPostingSource", (char *)"name" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = ((Xapian::ValueWeightPostingSource const *)arg1)->Xapian::ValueWeightPostingSource::name();
      } else {
        result = ((Xapian::ValueWeightPostingSource const *)arg1)->name();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueWeightPostingSource_init) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval **args[2];
  bool upcall = false;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueWeightPostingSource_init. Expected SWIGTYPE_p_Xapian__ValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of ValueWeightPostingSource_init. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValueWeightPostingSource", (char *)"init" TSRMLS_CC);
  {
    try {
      if (upcall) {
        (arg1)->Xapian::ValueWeightPostingSource::init((Xapian::Database const &)*arg2);
      } else {
        (arg1)->init((Xapian::Database const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueWeightPostingSource_get_description) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  zval **args[1];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueWeightPostingSource_get_description. Expected SWIGTYPE_p_Xapian__ValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianValueWeightPostingSource", (char *)"get_description" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = ((Xapian::ValueWeightPostingSource const *)arg1)->Xapian::ValueWeightPostingSource::get_description();
      } else {
        result = ((Xapian::ValueWeightPostingSource const *)arg1)->get_description();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ValueWeightPostingSource(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ValueWeightPostingSource *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ValueWeightPostingSource TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ValueWeightPostingSource resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DecreasingValueWeightPostingSource__SWIG_0) {
  Xapian::valueno arg1 ;
  Xapian::docid arg2 ;
  Xapian::docid arg3 ;
  zval **args[3];
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::docid) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DecreasingValueWeightPostingSource__SWIG_1) {
  Xapian::valueno arg1 ;
  Xapian::docid arg2 ;
  zval **args[2];
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DecreasingValueWeightPostingSource__SWIG_2) {
  Xapian::valueno arg1 ;
  zval **args[1];
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_DecreasingValueWeightPostingSource) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _wrap_new_DecreasingValueWeightPostingSource__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_new_DecreasingValueWeightPostingSource__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_new_DecreasingValueWeightPostingSource__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_DecreasingValueWeightPostingSource'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DecreasingValueWeightPostingSource_get_weight) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DecreasingValueWeightPostingSource_get_weight. Expected SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DecreasingValueWeightPostingSource_name) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DecreasingValueWeightPostingSource_name. Expected SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DecreasingValueWeightPostingSource_init) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DecreasingValueWeightPostingSource_init. Expected SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of DecreasingValueWeightPostingSource_init. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DecreasingValueWeightPostingSource_next) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  double arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DecreasingValueWeightPostingSource_next. Expected SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->next(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DecreasingValueWeightPostingSource_skip_to) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DecreasingValueWeightPostingSource_skip_to. Expected SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DecreasingValueWeightPostingSource_check) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval **args[3];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DecreasingValueWeightPostingSource_check. Expected SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_DecreasingValueWeightPostingSource_get_description) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DecreasingValueWeightPostingSource_get_description. Expected SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_DecreasingValueWeightPostingSource(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::DecreasingValueWeightPostingSource resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ValueMapPostingSource) {
  Xapian::valueno arg1 ;
  zval **args[1];
  Xapian::ValueMapPostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::ValueMapPostingSource *)new Xapian::ValueMapPostingSource(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueMapPostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueMapPostingSource_add_mapping) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  std::string *arg2 = 0 ;
  double arg3 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueMapPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueMapPostingSource_add_mapping. Expected SWIGTYPE_p_Xapian__ValueMapPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_mapping((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueMapPostingSource_clear_mappings) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueMapPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueMapPostingSource_clear_mappings. Expected SWIGTYPE_p_Xapian__ValueMapPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->clear_mappings();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueMapPostingSource_set_default_weight) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  double arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueMapPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueMapPostingSource_set_default_weight. Expected SWIGTYPE_p_Xapian__ValueMapPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_default_weight(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueMapPostingSource_get_weight) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueMapPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueMapPostingSource_get_weight. Expected SWIGTYPE_p_Xapian__ValueMapPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::ValueMapPostingSource const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueMapPostingSource_name) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueMapPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueMapPostingSource_name. Expected SWIGTYPE_p_Xapian__ValueMapPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ValueMapPostingSource const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueMapPostingSource_init) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueMapPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueMapPostingSource_init. Expected SWIGTYPE_p_Xapian__ValueMapPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of ValueMapPostingSource_init. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueMapPostingSource_get_description) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueMapPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueMapPostingSource_get_description. Expected SWIGTYPE_p_Xapian__ValueMapPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ValueMapPostingSource const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ValueMapPostingSource(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ValueMapPostingSource *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ValueMapPostingSource TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ValueMapPostingSource resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_FixedWeightPostingSource) {
  double arg1 ;
  zval **args[1];
  Xapian::FixedWeightPostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::FixedWeightPostingSource *)new Xapian::FixedWeightPostingSource(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_get_termfreq_min) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_get_termfreq_min. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_min();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_get_termfreq_est) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_get_termfreq_est. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_est();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_get_termfreq_max) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_get_termfreq_max. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_max();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_get_weight) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_get_weight. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::FixedWeightPostingSource const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_next) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  double arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_next. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->next(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_skip_to) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_skip_to. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_check) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval **args[3];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_check. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_at_end) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_at_end. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (bool)((Xapian::FixedWeightPostingSource const *)arg1)->at_end();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_get_docid) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  zval **args[1];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_get_docid. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::docid)((Xapian::FixedWeightPostingSource const *)arg1)->get_docid();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_name) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_name. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::FixedWeightPostingSource const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_init) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_init. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of FixedWeightPostingSource_init. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_FixedWeightPostingSource_get_description) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FixedWeightPostingSource_get_description. Expected SWIGTYPE_p_Xapian__FixedWeightPostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::FixedWeightPostingSource const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_FixedWeightPostingSource(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__FixedWeightPostingSource TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::FixedWeightPostingSource resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_MatchSpy) {
  zval *arg0;
  zval **args[1];
  Xapian::MatchSpy *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  if ( arg0->type == IS_NULL ) {
    /* not subclassed */
    SWIG_PHP_Error(E_ERROR, "accessing abstract class or protected constructor");
  } else {
    result = (Xapian::MatchSpy *)new SwigDirector_MatchSpy(arg0 TSRMLS_CC);
  }
  
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MatchSpy, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_MatchSpy(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::MatchSpy *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__MatchSpy TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::MatchSpy resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MatchSpy_apply) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  Xapian::Document *arg2 = 0 ;
  double arg3 ;
  zval **args[3];
  bool upcall = false;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MatchSpy_apply. Expected SWIGTYPE_p_Xapian__MatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of MatchSpy_apply. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianMatchSpy", (char *)"operator ()" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::MatchSpy::operator ()" TSRMLS_CC);
      } else {
        (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MatchSpy_name) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  zval **args[1];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MatchSpy_name. Expected SWIGTYPE_p_Xapian__MatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianMatchSpy", (char *)"name" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = ((Xapian::MatchSpy const *)arg1)->Xapian::MatchSpy::name();
      } else {
        result = ((Xapian::MatchSpy const *)arg1)->name();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MatchSpy_merge_results) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  bool upcall = false;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MatchSpy_merge_results. Expected SWIGTYPE_p_Xapian__MatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianMatchSpy", (char *)"merge_results" TSRMLS_CC);
  {
    try {
      if (upcall) {
        (arg1)->Xapian::MatchSpy::merge_results((std::string const &)*arg2);
      } else {
        (arg1)->merge_results((std::string const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MatchSpy_get_description) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  zval **args[1];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MatchSpy_get_description. Expected SWIGTYPE_p_Xapian__MatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianMatchSpy", (char *)"get_description" TSRMLS_CC);
  {
    try {
      if (upcall) {
        result = ((Xapian::MatchSpy const *)arg1)->Xapian::MatchSpy::get_description();
      } else {
        result = ((Xapian::MatchSpy const *)arg1)->get_description();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_MatchSpy_release) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  zval **args[1];
  Xapian::MatchSpy *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__MatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of MatchSpy_release. Expected SWIGTYPE_p_Xapian__MatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::MatchSpy *)((Xapian::MatchSpy const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MatchSpy, 0);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ValueCountMatchSpy__SWIG_0) {
  Xapian::ValueCountMatchSpy *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ValueCountMatchSpy__SWIG_1) {
  Xapian::valueno arg1 ;
  zval **args[1];
  Xapian::ValueCountMatchSpy *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_ValueCountMatchSpy) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_ValueCountMatchSpy__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _wrap_new_ValueCountMatchSpy__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_ValueCountMatchSpy'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueCountMatchSpy_get_total) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  zval **args[1];
  size_t result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueCountMatchSpy_get_total. Expected SWIGTYPE_p_Xapian__ValueCountMatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_total();
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueCountMatchSpy_values_begin) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueCountMatchSpy_values_begin. Expected SWIGTYPE_p_Xapian__ValueCountMatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueCountMatchSpy_values_end) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueCountMatchSpy_values_end. Expected SWIGTYPE_p_Xapian__ValueCountMatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueCountMatchSpy_top_values_begin) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t arg2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueCountMatchSpy_top_values_begin. Expected SWIGTYPE_p_Xapian__ValueCountMatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (size_t) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_begin(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueCountMatchSpy_top_values_end) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t arg2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueCountMatchSpy_top_values_end. Expected SWIGTYPE_p_Xapian__ValueCountMatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (size_t) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_end(arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueCountMatchSpy_apply) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  Xapian::Document *arg2 = 0 ;
  double arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueCountMatchSpy_apply. Expected SWIGTYPE_p_Xapian__ValueCountMatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of ValueCountMatchSpy_apply. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueCountMatchSpy_name) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueCountMatchSpy_name. Expected SWIGTYPE_p_Xapian__ValueCountMatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueCountMatchSpy_merge_results) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueCountMatchSpy_merge_results. Expected SWIGTYPE_p_Xapian__ValueCountMatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->merge_results((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_ValueCountMatchSpy_get_description) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ValueCountMatchSpy_get_description. Expected SWIGTYPE_p_Xapian__ValueCountMatchSpy");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_ValueCountMatchSpy(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::ValueCountMatchSpy *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__ValueCountMatchSpy TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::ValueCountMatchSpy resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_miles_to_metres) {
  double arg1 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)Xapian::miles_to_metres(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_metres_to_miles) {
  double arg1 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)Xapian::metres_to_miles(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoord_latitude_set) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  double arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoord_latitude_set. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  if (arg1) (arg1)->latitude = arg2;
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoord_latitude_get) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoord_latitude_get. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (double) ((arg1)->latitude);
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoord_longitude_set) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  double arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoord_longitude_set. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  if (arg1) (arg1)->longitude = arg2;
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoord_longitude_get) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoord_longitude_get. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (double) ((arg1)->longitude);
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoord__SWIG_0) {
  Xapian::LatLongCoord *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::LatLongCoord *)new Xapian::LatLongCoord();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongCoord, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoord__SWIG_1) {
  double arg1 ;
  double arg2 ;
  zval **args[2];
  Xapian::LatLongCoord *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongCoord *)new Xapian::LatLongCoord(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongCoord, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoord) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_LatLongCoord__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_DOUBLE); 
      if (_v) {
        _wrap_new_LatLongCoord__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_LatLongCoord'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoord_unserialise) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoord_unserialise. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->unserialise((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoord_serialise) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoord_serialise. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::LatLongCoord const *)arg1)->serialise();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoord_get_description) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoord_get_description. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::LatLongCoord const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_LatLongCoord(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::LatLongCoord *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__LatLongCoord TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::LatLongCoord resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoordsIterator) {
  Xapian::LatLongCoordsIterator *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::LatLongCoordsIterator *)new Xapian::LatLongCoordsIterator();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoordsIterator_equals) {
  Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
  Xapian::LatLongCoordsIterator *arg2 = 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoordsIterator_equals. Expected SWIGTYPE_p_Xapian__LatLongCoordsIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of LatLongCoordsIterator_equals. Expected SWIGTYPE_p_Xapian__LatLongCoordsIterator");
    }
  }
  {
    try {
      result = (bool)Xapian_LatLongCoordsIterator_equals((Xapian::LatLongCoordsIterator const *)arg1,(Xapian::LatLongCoordsIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoordsIterator_get_coord) {
  Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
  zval **args[1];
  Xapian::LatLongCoord result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoordsIterator_get_coord. Expected SWIGTYPE_p_Xapian__LatLongCoordsIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = Xapian_LatLongCoordsIterator_get_coord((Xapian::LatLongCoordsIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::LatLongCoord * resultobj = new Xapian::LatLongCoord((const Xapian::LatLongCoord &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__LatLongCoord, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoordsIterator_next) {
  Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoordsIterator_next. Expected SWIGTYPE_p_Xapian__LatLongCoordsIterator");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      Xapian_LatLongCoordsIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_LatLongCoordsIterator(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::LatLongCoordsIterator *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__LatLongCoordsIterator TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::LatLongCoordsIterator resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoords_begin) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  zval **args[1];
  Xapian::LatLongCoordsIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoords_begin. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::LatLongCoords const *)arg1)->begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::LatLongCoordsIterator * resultobj = new Xapian::LatLongCoordsIterator((const Xapian::LatLongCoordsIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoords_end) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  zval **args[1];
  Xapian::LatLongCoordsIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoords_end. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::LatLongCoords const *)arg1)->end();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::LatLongCoordsIterator * resultobj = new Xapian::LatLongCoordsIterator((const Xapian::LatLongCoordsIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoords_size) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  zval **args[1];
  size_t result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoords_size. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::LatLongCoords const *)arg1)->size();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoords_is_empty) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoords_is_empty. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (bool)((Xapian::LatLongCoords const *)arg1)->empty();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoords_append) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  Xapian::LatLongCoord *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoords_append. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of LatLongCoords_append. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  {
    try {
      (arg1)->append((Xapian::LatLongCoord const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoords__SWIG_0) {
  Xapian::LatLongCoords *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::LatLongCoords *)new Xapian::LatLongCoords();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongCoords, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoords__SWIG_1) {
  Xapian::LatLongCoord *arg1 = 0 ;
  zval **args[1];
  Xapian::LatLongCoords *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg1 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of new_LatLongCoords. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  {
    try {
      result = (Xapian::LatLongCoords *)new Xapian::LatLongCoords((Xapian::LatLongCoord const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongCoords, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoords) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_LatLongCoords__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    {
      void *ptr;
      _v = (SWIG_ConvertPtr(*argv[0], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoord, 0) == 0);
    }
    if (_v) {
      _wrap_new_LatLongCoords__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_LatLongCoords'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoords_unserialise) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoords_unserialise. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->unserialise((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoords_serialise) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoords_serialise. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::LatLongCoords const *)arg1)->serialise();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongCoords_get_description) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongCoords_get_description. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::LatLongCoords const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_LatLongCoords(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::LatLongCoords *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__LatLongCoords TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::LatLongCoords resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_LatLongMetric(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::LatLongMetric *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__LatLongMetric TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::LatLongMetric resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongMetric_pointwise_distance) {
  Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
  Xapian::LatLongCoord *arg2 = 0 ;
  Xapian::LatLongCoord *arg3 = 0 ;
  zval **args[3];
  bool upcall = false;
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongMetric_pointwise_distance. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of LatLongMetric_pointwise_distance. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of LatLongMetric_pointwise_distance. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianLatLongMetric", (char *)"pointwise_distance" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::LatLongMetric::pointwise_distance" TSRMLS_CC);
      } else {
        result = (double)((Xapian::LatLongMetric const *)arg1)->pointwise_distance((Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongCoord const &)*arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongMetric_apply__SWIG_0) {
  Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  Xapian::LatLongCoords *arg3 = 0 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongMetric_apply. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of LatLongMetric_apply. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of LatLongMetric_apply. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  {
    try {
      result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongCoords const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongMetric_apply__SWIG_1) {
  Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp3 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongMetric_apply. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of LatLongMetric_apply. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongMetric_apply__SWIG_2) {
  Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  size_t arg4 ;
  zval **args[4];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongMetric_apply. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of LatLongMetric_apply. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,62,CONVERT_STRING_IN@*/
  if ((*args[2])->type==IS_NULL) {
    arg3 = (char *) 0;
  } else {
    convert_to_string_ex(args[2]);
    arg3 = (char *) Z_STRVAL_PP(args[2]);
  }
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (size_t) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(char const *)arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongMetric_apply) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
        }
        if (_v) {
          _wrap_LatLongMetric_apply__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        {
          _v = (Z_TYPE_PP(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_LatLongMetric_apply__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, 0) >= 0);
    }
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_STRING); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_LatLongMetric_apply__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'LatLongMetric_apply'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongMetric_name) {
  Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
  zval **args[1];
  bool upcall = false;
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongMetric_name. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  upcall = !Swig::Director::swig_is_overridden_method((char *)"XapianLatLongMetric", (char *)"name" TSRMLS_CC);
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::LatLongMetric::name" TSRMLS_CC);
      } else {
        result = ((Xapian::LatLongMetric const *)arg1)->name();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongMetric) {
  zval *arg0;
  zval **args[1];
  Xapian::LatLongMetric *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  arg0 = *args[0];
  
  {
    try {
      if ( arg0->type == IS_NULL ) {
        /* not subclassed */
        SWIG_PHP_Error(E_ERROR, "accessing abstract class or protected constructor");
      } else {
        result = (Xapian::LatLongMetric *)new SwigDirector_LatLongMetric(arg0 TSRMLS_CC);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongMetric, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_GreatCircleMetric__SWIG_0) {
  Xapian::GreatCircleMetric *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::GreatCircleMetric *)new Xapian::GreatCircleMetric();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__GreatCircleMetric, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_GreatCircleMetric__SWIG_1) {
  double arg1 ;
  zval **args[1];
  Xapian::GreatCircleMetric *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::GreatCircleMetric *)new Xapian::GreatCircleMetric(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__GreatCircleMetric, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_GreatCircleMetric) {
  int argc;
  zval **argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_GreatCircleMetric__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_DOUBLE); 
    if (_v) {
      _wrap_new_GreatCircleMetric__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_GreatCircleMetric'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_GreatCircleMetric_pointwise_distance) {
  Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *) 0 ;
  Xapian::LatLongCoord *arg2 = 0 ;
  Xapian::LatLongCoord *arg3 = 0 ;
  zval **args[3];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__GreatCircleMetric, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of GreatCircleMetric_pointwise_distance. Expected SWIGTYPE_p_Xapian__GreatCircleMetric");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of GreatCircleMetric_pointwise_distance. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of GreatCircleMetric_pointwise_distance. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  {
    try {
      result = (double)((Xapian::GreatCircleMetric const *)arg1)->pointwise_distance((Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongCoord const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_GreatCircleMetric_name) {
  Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__GreatCircleMetric, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of GreatCircleMetric_name. Expected SWIGTYPE_p_Xapian__GreatCircleMetric");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::GreatCircleMetric const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_GreatCircleMetric(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::GreatCircleMetric *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__GreatCircleMetric TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::GreatCircleMetric resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource__SWIG_0) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  Xapian::LatLongMetric *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  Xapian::LatLongDistancePostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4,arg5,arg6);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource__SWIG_1) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  Xapian::LatLongMetric *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  zval **args[5];
  Xapian::LatLongDistancePostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource__SWIG_2) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  Xapian::LatLongMetric *arg3 = 0 ;
  double arg4 ;
  zval **args[4];
  Xapian::LatLongDistancePostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource__SWIG_3) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  Xapian::LatLongMetric *arg3 = 0 ;
  zval **args[3];
  Xapian::LatLongDistancePostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource__SWIG_4) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  zval **args[5];
  Xapian::LatLongDistancePostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource__SWIG_5) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  Xapian::LatLongDistancePostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource__SWIG_6) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  double arg3 ;
  zval **args[3];
  Xapian::LatLongDistancePostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource__SWIG_7) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  zval **args[2];
  Xapian::LatLongDistancePostingSource *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistancePostingSource. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource) {
  int argc;
  zval **argv[6];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        _wrap_new_LatLongDistancePostingSource__SWIG_7(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongMetric, 0) == 0);
        }
        if (_v) {
          _wrap_new_LatLongDistancePostingSource__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          _wrap_new_LatLongDistancePostingSource__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongMetric, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            _wrap_new_LatLongDistancePostingSource__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            _wrap_new_LatLongDistancePostingSource__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongMetric, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_DOUBLE); 
            if (_v) {
              _wrap_new_LatLongDistancePostingSource__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_DOUBLE); 
            if (_v) {
              _wrap_new_LatLongDistancePostingSource__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongMetric, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_DOUBLE); 
            if (_v) {
              _v = (Z_TYPE_PP(argv[5]) == IS_DOUBLE); 
              if (_v) {
                _wrap_new_LatLongDistancePostingSource__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
              }
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_LatLongDistancePostingSource'";
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_LatLongDistancePostingSource(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::LatLongDistancePostingSource *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__LatLongDistancePostingSource TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::LatLongDistancePostingSource resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongDistancePostingSource_next) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  double arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongDistancePostingSource_next. Expected SWIGTYPE_p_Xapian__LatLongDistancePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->next(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongDistancePostingSource_skip_to) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongDistancePostingSource_skip_to. Expected SWIGTYPE_p_Xapian__LatLongDistancePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongDistancePostingSource_check) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval **args[3];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongDistancePostingSource_check. Expected SWIGTYPE_p_Xapian__LatLongDistancePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongDistancePostingSource_get_weight) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongDistancePostingSource_get_weight. Expected SWIGTYPE_p_Xapian__LatLongDistancePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (double)((Xapian::LatLongDistancePostingSource const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongDistancePostingSource_name) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongDistancePostingSource_name. Expected SWIGTYPE_p_Xapian__LatLongDistancePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::LatLongDistancePostingSource const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongDistancePostingSource_init) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongDistancePostingSource_init. Expected SWIGTYPE_p_Xapian__LatLongDistancePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of LatLongDistancePostingSource_init. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongDistancePostingSource_get_description) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongDistancePostingSource_get_description. Expected SWIGTYPE_p_Xapian__LatLongDistancePostingSource");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::LatLongDistancePostingSource const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistanceKeyMaker__SWIG_0) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  Xapian::LatLongMetric *arg3 = 0 ;
  double arg4 ;
  zval **args[4];
  Xapian::LatLongDistanceKeyMaker *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistanceKeyMaker. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of new_LatLongDistanceKeyMaker. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistanceKeyMaker__SWIG_1) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  Xapian::LatLongMetric *arg3 = 0 ;
  zval **args[3];
  Xapian::LatLongDistanceKeyMaker *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistanceKeyMaker. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of new_LatLongDistanceKeyMaker. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  {
    try {
      result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistanceKeyMaker__SWIG_2) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  zval **args[2];
  Xapian::LatLongDistanceKeyMaker *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistanceKeyMaker. Expected SWIGTYPE_p_Xapian__LatLongCoords");
    }
  }
  {
    try {
      result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistanceKeyMaker__SWIG_3) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoord *arg2 = 0 ;
  Xapian::LatLongMetric *arg3 = 0 ;
  double arg4 ;
  zval **args[4];
  Xapian::LatLongDistanceKeyMaker *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistanceKeyMaker. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of new_LatLongDistanceKeyMaker. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,52,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistanceKeyMaker__SWIG_4) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoord *arg2 = 0 ;
  Xapian::LatLongMetric *arg3 = 0 ;
  zval **args[3];
  Xapian::LatLongDistanceKeyMaker *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistanceKeyMaker. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of new_LatLongDistanceKeyMaker. Expected SWIGTYPE_p_Xapian__LatLongMetric");
    }
  }
  {
    try {
      result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistanceKeyMaker__SWIG_5) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoord *arg2 = 0 ;
  zval **args[2];
  Xapian::LatLongDistanceKeyMaker *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (Xapian::valueno) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_LatLongDistanceKeyMaker. Expected SWIGTYPE_p_Xapian__LatLongCoord");
    }
  }
  {
    try {
      result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistanceKeyMaker) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        _wrap_new_LatLongDistanceKeyMaker__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoord, 0) == 0);
      }
      if (_v) {
        _wrap_new_LatLongDistanceKeyMaker__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoord, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongMetric, 0) == 0);
        }
        if (_v) {
          _wrap_new_LatLongDistanceKeyMaker__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongMetric, 0) == 0);
        }
        if (_v) {
          _wrap_new_LatLongDistanceKeyMaker__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoords, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongMetric, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            _wrap_new_LatLongDistanceKeyMaker__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      {
        void *ptr;
        _v = (SWIG_ConvertPtr(*argv[1], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongCoord, 0) == 0);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__LatLongMetric, 0) == 0);
        }
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            _wrap_new_LatLongDistanceKeyMaker__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_LatLongDistanceKeyMaker'";
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_LatLongDistanceKeyMaker(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::LatLongDistanceKeyMaker *arg1 = (Xapian::LatLongDistanceKeyMaker *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::LatLongDistanceKeyMaker *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::LatLongDistanceKeyMaker resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_LatLongDistanceKeyMaker_apply) {
  Xapian::LatLongDistanceKeyMaker *arg1 = (Xapian::LatLongDistanceKeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval **args[2];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of LatLongDistanceKeyMaker_apply. Expected SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of LatLongDistanceKeyMaker_apply. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  {
    try {
      result = ((Xapian::LatLongDistanceKeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_add_database) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_add_database. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Database_add_database. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  {
    try {
      (arg1)->add_database((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Database__SWIG_0) {
  Xapian::Database *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Database, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Database__SWIG_1) {
  std::string *arg1 = 0 ;
  int arg2 ;
  std::string temp1 ;
  zval **args[2];
  Xapian::Database *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Database, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Database__SWIG_2) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::Database *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Database, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Database__SWIG_3) {
  int arg1 ;
  int arg2 ;
  zval **args[2];
  Xapian::Database *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (int) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Database, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Database__SWIG_4) {
  int arg1 ;
  zval **args[1];
  Xapian::Database *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (int) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Database, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_Database) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_Database__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_Database__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _wrap_new_Database__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_new_Database__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_new_Database__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_Database'";
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Database(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::Database *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__Database TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::Database resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_reopen) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_reopen. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (bool)(arg1)->reopen();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_close) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_close. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->close();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_description) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_description. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_postlist_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::PostingIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_postlist_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->postlist_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::PostingIterator * resultobj = new Xapian::PostingIterator((const Xapian::PostingIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PostingIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_postlist_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::PostingIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_postlist_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  result = ((Xapian::Database const *)arg1)->postlist_end((std::string const &)*arg2);
  {
    Xapian::PostingIterator * resultobj = new Xapian::PostingIterator((const Xapian::PostingIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PostingIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_termlist_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_termlist_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->termlist_begin(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_termlist_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_termlist_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = ((Xapian::Database const *)arg1)->termlist_end(arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_has_positions) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_has_positions. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (bool)((Xapian::Database const *)arg1)->has_positions();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_positionlist_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  std::string *arg3 = 0 ;
  std::string temp3 ;
  zval **args[3];
  Xapian::PositionIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_positionlist_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->positionlist_begin(arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator((const Xapian::PositionIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_positionlist_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  std::string *arg3 = 0 ;
  std::string temp3 ;
  zval **args[3];
  Xapian::PositionIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_positionlist_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  result = ((Xapian::Database const *)arg1)->positionlist_end(arg2,(std::string const &)*arg3);
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator((const Xapian::PositionIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_allterms_begin__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_allterms_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_allterms_begin__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_allterms_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_allterms_begin) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _wrap_Database_allterms_begin__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_Database_allterms_begin__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Database_allterms_begin'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_allterms_end__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_allterms_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  result = ((Xapian::Database const *)arg1)->allterms_end((std::string const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_allterms_end__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_allterms_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::Database const *)arg1)->allterms_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_allterms_end) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _wrap_Database_allterms_end__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_Database_allterms_end__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Database_allterms_end'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_doccount) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_doccount. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_doccount();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_lastdocid) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_lastdocid. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::docid)((Xapian::Database const *)arg1)->get_lastdocid();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_avlength) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::doclength result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_avlength. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::doclength)((Xapian::Database const *)arg1)->get_avlength();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_DOUBLE(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_total_length) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::totallength result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_total_length. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::totallength)((Xapian::Database const *)arg1)->get_total_length();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_termfreq) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_termfreq. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_termfreq((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_term_exists) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_term_exists. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (bool)((Xapian::Database const *)arg1)->term_exists((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_collection_freq) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_collection_freq. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_collection_freq((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_value_freq) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  zval **args[2];
  Xapian::doccount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_value_freq. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_value_freq(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_value_lower_bound) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  zval **args[2];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_value_lower_bound. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_value_lower_bound(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_value_upper_bound) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  zval **args[2];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_value_upper_bound. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_value_upper_bound(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_doclength_lower_bound) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_doclength_lower_bound. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_lower_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_doclength_upper_bound) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_doclength_upper_bound. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_upper_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_wdf_upper_bound) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_wdf_upper_bound. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_wdf_upper_bound((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_valuestream_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  zval **args[2];
  Xapian::ValueIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_valuestream_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->valuestream_begin(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ValueIterator * resultobj = new Xapian::ValueIterator((const Xapian::ValueIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ValueIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_valuestream_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  zval **args[2];
  Xapian::ValueIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_valuestream_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::valueno) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = ((Xapian::Database const *)arg1)->valuestream_end(arg2);
  {
    Xapian::ValueIterator * resultobj = new Xapian::ValueIterator((const Xapian::ValueIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ValueIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_doclength) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_doclength. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_unique_terms) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  Xapian::termcount result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_unique_terms. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_unique_terms(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_keep_alive) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_keep_alive. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->keep_alive();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_document__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  Xapian::Document result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_document. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_document(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Document * resultobj = new Xapian::Document((const Xapian::Document &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Document, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_document__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  unsigned int arg3 ;
  zval **args[3];
  Xapian::Document result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_document. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_document(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Document * resultobj = new Xapian::Document((const Xapian::Document &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Document, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_document) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_Database_get_document__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_Database_get_document__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Database_get_document'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_spelling_suggestion__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  std::string temp2 ;
  zval **args[3];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_spelling_suggestion. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_spelling_suggestion__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_spelling_suggestion. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_spelling_suggestion) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_Database_get_spelling_suggestion__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_Database_get_spelling_suggestion__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Database_get_spelling_suggestion'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_spellings_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_spellings_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Database const *)arg1)->spellings_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_spellings_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_spellings_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::Database const *)arg1)->spellings_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_synonyms_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_synonyms_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonyms_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_synonyms_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_synonyms_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  result = ((Xapian::Database const *)arg1)->synonyms_end((std::string const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_synonym_keys_begin__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_synonym_keys_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_synonym_keys_begin__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_synonym_keys_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_synonym_keys_begin) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _wrap_Database_synonym_keys_begin__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_Database_synonym_keys_begin__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Database_synonym_keys_begin'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_synonym_keys_end__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_synonym_keys_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  result = ((Xapian::Database const *)arg1)->synonym_keys_end((std::string const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_synonym_keys_end__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_synonym_keys_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::Database const *)arg1)->synonym_keys_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_synonym_keys_end) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _wrap_Database_synonym_keys_end__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_Database_synonym_keys_end__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Database_synonym_keys_end'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_metadata) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_metadata. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_metadata((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_metadata_keys_begin__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_metadata_keys_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_metadata_keys_begin__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_metadata_keys_begin. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_metadata_keys_begin) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _wrap_Database_metadata_keys_begin__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_Database_metadata_keys_begin__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Database_metadata_keys_begin'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_metadata_keys_end__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_metadata_keys_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  result = ((Xapian::Database const *)arg1)->metadata_keys_end((std::string const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_metadata_keys_end__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::TermIterator result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_metadata_keys_end. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = ((Xapian::Database const *)arg1)->metadata_keys_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator((const Xapian::TermIterator &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_metadata_keys_end) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _wrap_Database_metadata_keys_end__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_Database_metadata_keys_end__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Database_metadata_keys_end'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_uuid) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_uuid. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_uuid();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_locked) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_locked. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (bool)((Xapian::Database const *)arg1)->locked();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_get_revision) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  zval **args[1];
  Xapian::rev result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_get_revision. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = (Xapian::rev)((Xapian::Database const *)arg1)->get_revision();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_check__SWIG_0) {
  std::string *arg1 = 0 ;
  int arg2 ;
  std::string temp1 ;
  zval **args[2];
  size_t result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Database::check((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_check__SWIG_1) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  size_t result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = Xapian::Database::check((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_check__SWIG_2) {
  int arg1 ;
  int arg2 ;
  zval **args[2];
  size_t result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (int) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Database::check(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_check__SWIG_3) {
  int arg1 ;
  zval **args[1];
  size_t result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (int) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Database::check(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_check) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Database_check__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _wrap_Database_check__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_Database_check__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    _v = (Z_TYPE_PP(argv[0]) == IS_LONG); 
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_Database_check__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Database_check'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  int arg4 ;
  std::string temp2 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_compact. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->compact((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_compact. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->compact((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_2) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_compact. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->compact((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_3) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  int arg2 ;
  unsigned int arg3 ;
  int arg4 ;
  zval **args[4];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_compact. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->compact(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_4) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  int arg2 ;
  unsigned int arg3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_compact. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->compact(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_5) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  int arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_compact. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->compact(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_6) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  int arg4 ;
  Xapian::Compactor *arg5 = 0 ;
  std::string temp2 ;
  zval **args[5];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_compact. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[4], (void **) &arg5, SWIGTYPE_p_Xapian__Compactor, 0) < 0 || arg5 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 5 of Database_compact. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  {
    try {
      (arg1)->compact((std::string const &)*arg2,arg3,arg4,*arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_7) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  int arg2 ;
  unsigned int arg3 ;
  int arg4 ;
  Xapian::Compactor *arg5 = 0 ;
  zval **args[5];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__Database, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Database_compact. Expected SWIGTYPE_p_Xapian__Database");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (unsigned int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[4], (void **) &arg5, SWIGTYPE_p_Xapian__Compactor, 0) < 0 || arg5 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 5 of Database_compact. Expected SWIGTYPE_p_Xapian__Compactor");
    }
  }
  {
    try {
      (arg1)->compact(arg2,arg3,arg4,*arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_Database_compact) {
  int argc;
  zval **argv[5];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_Database_compact__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_Database_compact__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_Database_compact__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_Database_compact__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_Database_compact__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_Database_compact__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            {
              void *tmp;
              _v = (SWIG_ConvertPtr(*argv[4], (void**)&tmp, SWIGTYPE_p_Xapian__Compactor, 0) >= 0);
            }
            if (_v) {
              _wrap_Database_compact__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Database, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            {
              void *tmp;
              _v = (SWIG_ConvertPtr(*argv[4], (void**)&tmp, SWIGTYPE_p_Xapian__Compactor, 0) >= 0);
            }
            if (_v) {
              _wrap_Database_compact__SWIG_7(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Database_compact'";
  SWIG_FAIL(TSRMLS_C);
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_WritableDatabase(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (Xapian::WritableDatabase *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_Xapian__WritableDatabase TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "Xapian::WritableDatabase resource already free'd");
  {
    try {
      delete arg1;
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_WritableDatabase__SWIG_0) {
  Xapian::WritableDatabase *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_WritableDatabase__SWIG_1) {
  std::string *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  std::string temp1 ;
  zval **args[3];
  Xapian::WritableDatabase *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_WritableDatabase__SWIG_2) {
  std::string *arg1 = 0 ;
  int arg2 ;
  std::string temp1 ;
  zval **args[2];
  Xapian::WritableDatabase *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_WritableDatabase__SWIG_3) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::WritableDatabase *result = 0 ;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_new_WritableDatabase) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 0) {
    _wrap_new_WritableDatabase__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_WritableDatabase__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_new_WritableDatabase__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_new_WritableDatabase__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'new_WritableDatabase'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_commit) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_commit. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->commit();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_flush) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_flush. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->flush();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_begin_transaction__SWIG_0) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  bool arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_begin_transaction. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,2,CONVERT_BOOL_IN@*/
  convert_to_boolean_ex(args[1]);
  arg2 = (bool) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->begin_transaction(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_begin_transaction__SWIG_1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_begin_transaction. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->begin_transaction();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_begin_transaction) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__WritableDatabase, 0) >= 0);
    }
    if (_v) {
      _wrap_WritableDatabase_begin_transaction__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__WritableDatabase, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_BOOL || Z_TYPE_PP(argv[1]) == IS_LONG);
      }
      if (_v) {
        _wrap_WritableDatabase_begin_transaction__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'WritableDatabase_begin_transaction'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_commit_transaction) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_commit_transaction. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->commit_transaction();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_cancel_transaction) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  zval **args[1];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_cancel_transaction. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      (arg1)->cancel_transaction();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_add_document) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval **args[2];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_add_document. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of WritableDatabase_add_document. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  {
    try {
      result = (Xapian::docid)(arg1)->add_document((Xapian::Document const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_delete_document__SWIG_0) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::docid arg2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_delete_document. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->delete_document(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_delete_document__SWIG_1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_delete_document. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->delete_document((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_delete_document) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__WritableDatabase, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_WritableDatabase_delete_document__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__WritableDatabase, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_WritableDatabase_delete_document__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'WritableDatabase_delete_document'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_replace_document__SWIG_0) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::docid arg2 ;
  Xapian::Document *arg3 = 0 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_replace_document. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (Xapian::docid) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of WritableDatabase_replace_document. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  {
    try {
      (arg1)->replace_document(arg2,(Xapian::Document const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_replace_document__SWIG_1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::Document *arg3 = 0 ;
  std::string temp2 ;
  zval **args[3];
  Xapian::docid result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_replace_document. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg3 == NULL) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of WritableDatabase_replace_document. Expected SWIGTYPE_p_Xapian__Document");
    }
  }
  {
    try {
      result = (Xapian::docid)(arg1)->replace_document((std::string const &)*arg2,(Xapian::Document const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_replace_document) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__WritableDatabase, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__Document, 0) == 0);
        }
        if (_v) {
          _wrap_WritableDatabase_replace_document__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__WritableDatabase, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          void *ptr;
          _v = (SWIG_ConvertPtr(*argv[2], (void **)&ptr, SWIGTYPE_p_Xapian__Document, 0) == 0);
        }
        if (_v) {
          _wrap_WritableDatabase_replace_document__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'WritableDatabase_replace_document'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_add_spelling__SWIG_0) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_add_spelling. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_add_spelling__SWIG_1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_add_spelling. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_add_spelling) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__WritableDatabase, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_WritableDatabase_add_spelling__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__WritableDatabase, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_WritableDatabase_add_spelling__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'WritableDatabase_add_spelling'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_remove_spelling__SWIG_0) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  std::string temp2 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_remove_spelling. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (Xapian::termcount) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_remove_spelling__SWIG_1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_remove_spelling. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_remove_spelling) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__WritableDatabase, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_WritableDatabase_remove_spelling__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__WritableDatabase, 0) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_WritableDatabase_remove_spelling__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'WritableDatabase_remove_spelling'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_add_synonym) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_add_synonym. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_synonym((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_remove_synonym) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_remove_synonym. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_synonym((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_clear_synonyms) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval **args[2];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_clear_synonyms. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->clear_synonyms((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_set_metadata) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval **args[3];
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_set_metadata. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string_ex(args[2]);
  temp3.assign(Z_STRVAL_PP(args[2]), Z_STRLEN_PP(args[2]));
  arg3 = &temp3;
  
  {
    try {
      (arg1)->set_metadata((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_get_description) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  zval **args[1];
  std::string result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of WritableDatabase_get_description. Expected SWIGTYPE_p_Xapian__WritableDatabase");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    try {
      result = ((Xapian::WritableDatabase const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, const_cast<char*>((&result)->data()), (&result)->size(), 1);
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_auto_open_stub__SWIG_0) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::Database result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = Xapian::Auto::open_stub((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database((const Xapian::Database &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_auto_open_stub__SWIG_1) {
  std::string *arg1 = 0 ;
  int arg2 ;
  std::string temp1 ;
  zval **args[2];
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Auto::open_stub((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_auto_open_stub) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_auto_open_stub__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_auto_open_stub__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'auto_open_stub'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_inmemory_open) {
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = Xapian::InMemory::open();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_chert_open__SWIG_0) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval **args[1];
  Xapian::Database result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = Xapian::Chert::open((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database((const Xapian::Database &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_chert_open__SWIG_1) {
  std::string *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  std::string temp1 ;
  zval **args[3];
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Chert::open((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_chert_open__SWIG_2) {
  std::string *arg1 = 0 ;
  int arg2 ;
  std::string temp1 ;
  zval **args[2];
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Chert::open((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_chert_open) {
  int argc;
  zval **argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 1) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_chert_open__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_chert_open__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_chert_open__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'chert_open'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open__SWIG_0) {
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  useconds_t arg3 ;
  useconds_t arg4 ;
  std::string temp1 ;
  zval **args[4];
  Xapian::Database result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (unsigned int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (useconds_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (useconds_t) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database((const Xapian::Database &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open__SWIG_1) {
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  useconds_t arg3 ;
  std::string temp1 ;
  zval **args[3];
  Xapian::Database result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (unsigned int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (useconds_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database((const Xapian::Database &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open__SWIG_2) {
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  std::string temp1 ;
  zval **args[2];
  Xapian::Database result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (unsigned int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database((const Xapian::Database &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open_writable__SWIG_0) {
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  useconds_t arg3 ;
  useconds_t arg4 ;
  int arg5 ;
  std::string temp1 ;
  zval **args[5];
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (unsigned int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (useconds_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (useconds_t) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[4]);
  arg5 = (int) Z_LVAL_PP(args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open_writable__SWIG_1) {
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  useconds_t arg3 ;
  useconds_t arg4 ;
  std::string temp1 ;
  zval **args[4];
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (unsigned int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (useconds_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (useconds_t) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open_writable__SWIG_2) {
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  useconds_t arg3 ;
  std::string temp1 ;
  zval **args[3];
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (unsigned int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (useconds_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open_writable__SWIG_3) {
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  std::string temp1 ;
  zval **args[2];
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (unsigned int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open__SWIG_3) {
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  useconds_t arg3 ;
  std::string temp1 ;
  std::string temp2 ;
  zval **args[3];
  Xapian::Database result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (useconds_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database((const Xapian::Database &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open__SWIG_4) {
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  std::string temp1 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::Database result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database((const Xapian::Database &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_remote_open__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_remote_open__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_remote_open__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_remote_open__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_remote_open__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'remote_open'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open_writable__SWIG_4) {
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  useconds_t arg3 ;
  int arg4 ;
  std::string temp1 ;
  std::string temp2 ;
  zval **args[4];
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (useconds_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open_writable__SWIG_5) {
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  useconds_t arg3 ;
  std::string temp1 ;
  std::string temp2 ;
  zval **args[3];
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.gTw74cUnmP/swig/Lib/php5/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (useconds_t) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open_writable__SWIG_6) {
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  std::string temp1 ;
  std::string temp2 ;
  zval **args[2];
  Xapian::WritableDatabase result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string_ex(args[0]);
  temp1.assign(Z_STRVAL_PP(args[0]), Z_STRLEN_PP(args[0]));
  arg1 = &temp1;
  
  
  convert_to_string_ex(args[1]);
  temp2.assign(Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase((const Xapian::WritableDatabase &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
  
  
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_remote_open_writable) {
  int argc;
  zval **argv[5];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_remote_open_writable__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _wrap_remote_open_writable__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_remote_open_writable__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _wrap_remote_open_writable__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE_PP(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_remote_open_writable__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _wrap_remote_open_writable__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      _v = (Z_TYPE_PP(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_LONG); 
            if (_v) {
              _wrap_remote_open_writable__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'remote_open_writable'";
  SWIG_FAIL(TSRMLS_C);
}


ZEND_NAMED_FUNCTION(_wrap_BAD_VALUENO_get) {
  Xapian::valueno result;
  
  SWIG_ResetError(TSRMLS_C);
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::valueno)Xapian::BAD_VALUENO_get();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    ZVAL_LONG(return_value,result);
  }
thrown:
  return;
fail:
  SWIG_FAIL(TSRMLS_C);
}


static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ESetIterator) {
  __wrap_delete_ESetIterator(rsrc, SWIGTYPE_p_Xapian__ESetIterator->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__MSetIterator) {
  __wrap_delete_MSetIterator(rsrc, SWIGTYPE_p_Xapian__MSetIterator->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__PositionIterator) {
  __wrap_delete_PositionIterator(rsrc, SWIGTYPE_p_Xapian__PositionIterator->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__PostingIterator) {
  __wrap_delete_PostingIterator(rsrc, SWIGTYPE_p_Xapian__PostingIterator->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__TermIterator) {
  __wrap_delete_TermIterator(rsrc, SWIGTYPE_p_Xapian__TermIterator->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ValueIterator) {
  __wrap_delete_ValueIterator(rsrc, SWIGTYPE_p_Xapian__ValueIterator->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__TermGenerator) {
  __wrap_delete_TermGenerator(rsrc, SWIGTYPE_p_Xapian__TermGenerator->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__Document) {
  __wrap_delete_Document(rsrc, SWIGTYPE_p_Xapian__Document->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__LatLongCoordsIterator) {
  __wrap_delete_LatLongCoordsIterator(rsrc, SWIGTYPE_p_Xapian__LatLongCoordsIterator->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__StemImplementation) {
  __wrap_delete_StemImplementation(rsrc, SWIGTYPE_p_Xapian__StemImplementation->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__Registry) {
  __wrap_delete_Registry(rsrc, SWIGTYPE_p_Xapian__Registry->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__Database) {
  __wrap_delete_Database(rsrc, SWIGTYPE_p_Xapian__Database->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__WritableDatabase) {
  __wrap_delete_WritableDatabase(rsrc, SWIGTYPE_p_Xapian__WritableDatabase->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__LatLongMetric) {
  __wrap_delete_LatLongMetric(rsrc, SWIGTYPE_p_Xapian__LatLongMetric->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__GreatCircleMetric) {
  __wrap_delete_GreatCircleMetric(rsrc, SWIGTYPE_p_Xapian__GreatCircleMetric->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__Compactor) {
  __wrap_delete_Compactor(rsrc, SWIGTYPE_p_Xapian__Compactor->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__LMWeight) {
  __wrap_delete_LMWeight(rsrc, SWIGTYPE_p_Xapian__LMWeight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__PL2PlusWeight) {
  __wrap_delete_PL2PlusWeight(rsrc, SWIGTYPE_p_Xapian__PL2PlusWeight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__BM25PlusWeight) {
  __wrap_delete_BM25PlusWeight(rsrc, SWIGTYPE_p_Xapian__BM25PlusWeight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__BM25Weight) {
  __wrap_delete_BM25Weight(rsrc, SWIGTYPE_p_Xapian__BM25Weight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__Weight) {
  __wrap_delete_Weight(rsrc, SWIGTYPE_p_Xapian__Weight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ValueSetMatchDecider) {
  __wrap_delete_ValueSetMatchDecider(rsrc, SWIGTYPE_p_Xapian__ValueSetMatchDecider->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__MatchDecider) {
  __wrap_delete_MatchDecider(rsrc, SWIGTYPE_p_Xapian__MatchDecider->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ExpandDecider) {
  __wrap_delete_ExpandDecider(rsrc, SWIGTYPE_p_Xapian__ExpandDecider->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__LatLongCoord) {
  __wrap_delete_LatLongCoord(rsrc, SWIGTYPE_p_Xapian__LatLongCoord->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__Enquire) {
  __wrap_delete_Enquire(rsrc, SWIGTYPE_p_Xapian__Enquire->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ESet) {
  __wrap_delete_ESet(rsrc, SWIGTYPE_p_Xapian__ESet->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_swig_default_rsrc_destroy) {
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__Query) {
  __wrap_delete_Query(rsrc, SWIGTYPE_p_Xapian__Query->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__MultiValueKeyMaker) {
  __wrap_delete_MultiValueKeyMaker(rsrc, SWIGTYPE_p_Xapian__MultiValueKeyMaker->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__KeyMaker) {
  __wrap_delete_KeyMaker(rsrc, SWIGTYPE_p_Xapian__KeyMaker->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__LatLongDistanceKeyMaker) {
  __wrap_delete_LatLongDistanceKeyMaker(rsrc, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__RSet) {
  __wrap_delete_RSet(rsrc, SWIGTYPE_p_Xapian__RSet->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ValueMapPostingSource) {
  __wrap_delete_ValueMapPostingSource(rsrc, SWIGTYPE_p_Xapian__ValueMapPostingSource->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__DecreasingValueWeightPostingSource) {
  __wrap_delete_DecreasingValueWeightPostingSource(rsrc, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ValueWeightPostingSource) {
  __wrap_delete_ValueWeightPostingSource(rsrc, SWIGTYPE_p_Xapian__ValueWeightPostingSource->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ValuePostingSource) {
  __wrap_delete_ValuePostingSource(rsrc, SWIGTYPE_p_Xapian__ValuePostingSource->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__PostingSource) {
  __wrap_delete_PostingSource(rsrc, SWIGTYPE_p_Xapian__PostingSource->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__CoordWeight) {
  __wrap_delete_CoordWeight(rsrc, SWIGTYPE_p_Xapian__CoordWeight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__DPHWeight) {
  __wrap_delete_DPHWeight(rsrc, SWIGTYPE_p_Xapian__DPHWeight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__PL2Weight) {
  __wrap_delete_PL2Weight(rsrc, SWIGTYPE_p_Xapian__PL2Weight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__DLHWeight) {
  __wrap_delete_DLHWeight(rsrc, SWIGTYPE_p_Xapian__DLHWeight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__BB2Weight) {
  __wrap_delete_BB2Weight(rsrc, SWIGTYPE_p_Xapian__BB2Weight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__IneB2Weight) {
  __wrap_delete_IneB2Weight(rsrc, SWIGTYPE_p_Xapian__IneB2Weight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__IfB2Weight) {
  __wrap_delete_IfB2Weight(rsrc, SWIGTYPE_p_Xapian__IfB2Weight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__InL2Weight) {
  __wrap_delete_InL2Weight(rsrc, SWIGTYPE_p_Xapian__InL2Weight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__TradWeight) {
  __wrap_delete_TradWeight(rsrc, SWIGTYPE_p_Xapian__TradWeight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__TfIdfWeight) {
  __wrap_delete_TfIdfWeight(rsrc, SWIGTYPE_p_Xapian__TfIdfWeight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__BoolWeight) {
  __wrap_delete_BoolWeight(rsrc, SWIGTYPE_p_Xapian__BoolWeight->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__FixedWeightPostingSource) {
  __wrap_delete_FixedWeightPostingSource(rsrc, SWIGTYPE_p_Xapian__FixedWeightPostingSource->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__LatLongDistancePostingSource) {
  __wrap_delete_LatLongDistancePostingSource(rsrc, SWIGTYPE_p_Xapian__LatLongDistancePostingSource->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__MSet) {
  __wrap_delete_MSet(rsrc, SWIGTYPE_p_Xapian__MSet->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__QueryParser) {
  __wrap_delete_QueryParser(rsrc, SWIGTYPE_p_Xapian__QueryParser->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__MatchSpy) {
  __wrap_delete_MatchSpy(rsrc, SWIGTYPE_p_Xapian__MatchSpy->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__SimpleStopper) {
  __wrap_delete_SimpleStopper(rsrc, SWIGTYPE_p_Xapian__SimpleStopper->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__Stopper) {
  __wrap_delete_Stopper(rsrc, SWIGTYPE_p_Xapian__Stopper->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ValueCountMatchSpy) {
  __wrap_delete_ValueCountMatchSpy(rsrc, SWIGTYPE_p_Xapian__ValueCountMatchSpy->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__FieldProcessor) {
  __wrap_delete_FieldProcessor(rsrc, SWIGTYPE_p_Xapian__FieldProcessor->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__NumberValueRangeProcessor) {
  __wrap_delete_NumberValueRangeProcessor(rsrc, SWIGTYPE_p_Xapian__NumberValueRangeProcessor->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__DateValueRangeProcessor) {
  __wrap_delete_DateValueRangeProcessor(rsrc, SWIGTYPE_p_Xapian__DateValueRangeProcessor->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__NumberRangeProcessor) {
  __wrap_delete_NumberRangeProcessor(rsrc, SWIGTYPE_p_Xapian__NumberRangeProcessor->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__DateRangeProcessor) {
  __wrap_delete_DateRangeProcessor(rsrc, SWIGTYPE_p_Xapian__DateRangeProcessor->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__StringValueRangeProcessor) {
  __wrap_delete_StringValueRangeProcessor(rsrc, SWIGTYPE_p_Xapian__StringValueRangeProcessor->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ValueRangeProcessor) {
  __wrap_delete_ValueRangeProcessor(rsrc, SWIGTYPE_p_Xapian__ValueRangeProcessor->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__RangeProcessor) {
  __wrap_delete_RangeProcessor(rsrc, SWIGTYPE_p_Xapian__RangeProcessor->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ExpandDeciderFilterPrefix) {
  __wrap_delete_ExpandDeciderFilterPrefix(rsrc, SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__Stem) {
  __wrap_delete_Stem(rsrc, SWIGTYPE_p_Xapian__Stem->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__ExpandDeciderAnd) {
  __wrap_delete_ExpandDeciderAnd(rsrc, SWIGTYPE_p_Xapian__ExpandDeciderAnd->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_Xapian__LatLongCoords) {
  __wrap_delete_LatLongCoords(rsrc, SWIGTYPE_p_Xapian__LatLongCoords->name TSRMLS_CC);
}
/* end wrapper section */
/* class entry subsection */


/* arginfo subsection */
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_, 0, 0, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_00, 0, 0, 0)
 ZEND_ARG_PASS_INFO(0)
 ZEND_ARG_PASS_INFO(0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_0, 0, 0, 0)
 ZEND_ARG_PASS_INFO(0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_000, 0, 0, 0)
 ZEND_ARG_PASS_INFO(0)
 ZEND_ARG_PASS_INFO(0)
 ZEND_ARG_PASS_INFO(0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_0000, 0, 0, 0)
 ZEND_ARG_PASS_INFO(0)
 ZEND_ARG_PASS_INFO(0)
 ZEND_ARG_PASS_INFO(0)
 ZEND_ARG_PASS_INFO(0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_00000, 0, 0, 0)
 ZEND_ARG_PASS_INFO(0)
 ZEND_ARG_PASS_INFO(0)
 ZEND_ARG_PASS_INFO(0)
 ZEND_ARG_PASS_INFO(0)
 ZEND_ARG_PASS_INFO(0)
ZEND_END_ARG_INFO()


/* entry subsection */
/* Every non-class user visible function must have an entry here */
static zend_function_entry xapian_functions[] = {
 SWIG_ZEND_NAMED_FE(version_string,_wrap_version_string,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(major_version,_wrap_major_version,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(minor_version,_wrap_minor_version,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(revision,_wrap_revision,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(new_positioniterator,_wrap_new_PositionIterator,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(positioniterator_skip_to,_wrap_PositionIterator_skip_to,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(positioniterator_get_description,_wrap_PositionIterator_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(positioniterator_key,_wrap_PositionIterator_key,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(positioniterator_current,_wrap_PositionIterator_current,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(positioniterator_valid,_wrap_PositionIterator_valid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(positioniterator_rewind,_wrap_PositionIterator_rewind,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(positioniterator_equals,_wrap_PositionIterator_equals,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(positioniterator_get_termpos,_wrap_PositionIterator_get_termpos,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(positioniterator_next,_wrap_PositionIterator_next,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_postingiterator,_wrap_new_PostingIterator,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(postingiterator_get_wdf,_wrap_PostingIterator_get_wdf,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_get_doclength,_wrap_PostingIterator_get_doclength,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_get_unique_terms,_wrap_PostingIterator_get_unique_terms,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_positionlist_begin,_wrap_PostingIterator_positionlist_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_positionlist_end,_wrap_PostingIterator_positionlist_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_skip_to,_wrap_PostingIterator_skip_to,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(postingiterator_get_description,_wrap_PostingIterator_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_key,_wrap_PostingIterator_key,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_current,_wrap_PostingIterator_current,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_valid,_wrap_PostingIterator_valid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_rewind,_wrap_PostingIterator_rewind,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_equals,_wrap_PostingIterator_equals,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(postingiterator_get_docid,_wrap_PostingIterator_get_docid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingiterator_next,_wrap_PostingIterator_next,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_termiterator,_wrap_new_TermIterator,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(termiterator_get_wdf,_wrap_TermIterator_get_wdf,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_get_termfreq,_wrap_TermIterator_get_termfreq,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_positionlist_count,_wrap_TermIterator_positionlist_count,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_positionlist_begin,_wrap_TermIterator_positionlist_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_positionlist_end,_wrap_TermIterator_positionlist_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_skip_to,_wrap_TermIterator_skip_to,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termiterator_get_description,_wrap_TermIterator_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_key,_wrap_TermIterator_key,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_current,_wrap_TermIterator_current,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_valid,_wrap_TermIterator_valid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_rewind,_wrap_TermIterator_rewind,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_equals,_wrap_TermIterator_equals,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termiterator_get_term,_wrap_TermIterator_get_term,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termiterator_next,_wrap_TermIterator_next,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_valueiterator,_wrap_new_ValueIterator,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(valueiterator_get_docid,_wrap_ValueIterator_get_docid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueiterator_get_valueno,_wrap_ValueIterator_get_valueno,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueiterator_skip_to,_wrap_ValueIterator_skip_to,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valueiterator_check,_wrap_ValueIterator_check,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valueiterator_get_description,_wrap_ValueIterator_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueiterator_key,_wrap_ValueIterator_key,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueiterator_current,_wrap_ValueIterator_current,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueiterator_valid,_wrap_ValueIterator_valid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueiterator_rewind,_wrap_ValueIterator_rewind,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueiterator_equals,_wrap_ValueIterator_equals,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valueiterator_get_value,_wrap_ValueIterator_get_value,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueiterator_next,_wrap_ValueIterator_next,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_document,_wrap_new_Document,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(document_get_value,_wrap_Document_get_value,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(document_add_value,_wrap_Document_add_value,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(document_remove_value,_wrap_Document_remove_value,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(document_clear_values,_wrap_Document_clear_values,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_get_data,_wrap_Document_get_data,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_set_data,_wrap_Document_set_data,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(document_add_posting,_wrap_Document_add_posting,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(document_add_term,_wrap_Document_add_term,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(document_add_boolean_term,_wrap_Document_add_boolean_term,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(document_remove_posting,_wrap_Document_remove_posting,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(document_remove_postings,_wrap_Document_remove_postings,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(document_remove_term,_wrap_Document_remove_term,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(document_clear_terms,_wrap_Document_clear_terms,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_termlist_count,_wrap_Document_termlist_count,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_termlist_begin,_wrap_Document_termlist_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_termlist_end,_wrap_Document_termlist_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_values_count,_wrap_Document_values_count,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_values_begin,_wrap_Document_values_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_values_end,_wrap_Document_values_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_get_docid,_wrap_Document_get_docid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_serialise,_wrap_Document_serialise,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_unserialise,_wrap_Document_unserialise,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(document_get_description,_wrap_Document_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_registry,_wrap_new_Registry,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(registry_register_weighting_scheme,_wrap_Registry_register_weighting_scheme,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(registry_get_weighting_scheme,_wrap_Registry_get_weighting_scheme,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(registry_register_posting_source,_wrap_Registry_register_posting_source,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(registry_get_posting_source,_wrap_Registry_get_posting_source,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(registry_register_match_spy,_wrap_Registry_register_match_spy,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(registry_get_match_spy,_wrap_Registry_get_match_spy,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(registry_register_lat_long_metric,_wrap_Registry_register_lat_long_metric,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(registry_get_lat_long_metric,_wrap_Registry_get_lat_long_metric,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(query_matchnothing_get,_wrap_Query_MatchNothing_get,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(query_matchall_get,_wrap_Query_MatchAll_get,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(query_get_terms_begin,_wrap_Query_get_terms_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(query_get_terms_end,_wrap_Query_get_terms_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(query_get_unique_terms_begin,_wrap_Query_get_unique_terms_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(query_get_length,_wrap_Query_get_length,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(query_is_empty,_wrap_Query_is_empty,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(query_serialise,_wrap_Query_serialise,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(query_unserialise,_wrap_Query_unserialise,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(query_get_type,_wrap_Query_get_type,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(query_get_num_subqueries,_wrap_Query_get_num_subqueries,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(query_get_subquery,_wrap_Query_get_subquery,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(query_get_description,_wrap_Query_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_query,_wrap_new_Query,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_stemimplementation,_wrap_new_StemImplementation,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(stemimplementation_apply,_wrap_StemImplementation_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(stemimplementation_get_description,_wrap_StemImplementation_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_stem,_wrap_new_Stem,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(stem_apply,_wrap_Stem_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(stem_get_description,_wrap_Stem_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(stem_get_available_languages,_wrap_Stem_get_available_languages,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(new_termgenerator,_wrap_new_TermGenerator,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(termgenerator_set_stemmer,_wrap_TermGenerator_set_stemmer,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termgenerator_set_stopper,_wrap_TermGenerator_set_stopper,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termgenerator_set_document,_wrap_TermGenerator_set_document,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termgenerator_get_document,_wrap_TermGenerator_get_document,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termgenerator_set_database,_wrap_TermGenerator_set_database,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termgenerator_set_flags,_wrap_TermGenerator_set_flags,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termgenerator_set_stemming_strategy,_wrap_TermGenerator_set_stemming_strategy,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termgenerator_set_stopper_strategy,_wrap_TermGenerator_set_stopper_strategy,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termgenerator_set_max_word_length,_wrap_TermGenerator_set_max_word_length,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termgenerator_index_text,_wrap_TermGenerator_index_text,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termgenerator_index_text_without_positions,_wrap_TermGenerator_index_text_without_positions,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termgenerator_increase_termpos,_wrap_TermGenerator_increase_termpos,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termgenerator_get_termpos,_wrap_TermGenerator_get_termpos,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(termgenerator_set_termpos,_wrap_TermGenerator_set_termpos,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(termgenerator_get_description,_wrap_TermGenerator_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_mset,_wrap_new_MSet,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(mset_convert_to_percent,_wrap_MSet_convert_to_percent,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(mset_get_termfreq,_wrap_MSet_get_termfreq,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(mset_get_termweight,_wrap_MSet_get_termweight,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(mset_get_firstitem,_wrap_MSet_get_firstitem,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_get_matches_lower_bound,_wrap_MSet_get_matches_lower_bound,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_get_matches_estimated,_wrap_MSet_get_matches_estimated,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_get_matches_upper_bound,_wrap_MSet_get_matches_upper_bound,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_get_uncollapsed_matches_lower_bound,_wrap_MSet_get_uncollapsed_matches_lower_bound,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_get_uncollapsed_matches_estimated,_wrap_MSet_get_uncollapsed_matches_estimated,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_get_uncollapsed_matches_upper_bound,_wrap_MSet_get_uncollapsed_matches_upper_bound,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_get_max_attained,_wrap_MSet_get_max_attained,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_get_max_possible,_wrap_MSet_get_max_possible,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_snippet,_wrap_MSet_snippet,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(mset_fetch,_wrap_MSet_fetch,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_size,_wrap_MSet_size,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_is_empty,_wrap_MSet_is_empty,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_begin,_wrap_MSet_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_end,_wrap_MSet_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_back,_wrap_MSet_back,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_get_description,_wrap_MSet_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(mset_get_docid,_wrap_MSet_get_docid,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(mset_get_document,_wrap_MSet_get_document,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(mset_get_hit,_wrap_MSet_get_hit,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(mset_get_document_percentage,_wrap_MSet_get_document_percentage,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(msetiterator_mset_set,_wrap_MSetIterator_mset_set,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(msetiterator_mset_get,_wrap_MSetIterator_mset_get,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_off_from_end_set,_wrap_MSetIterator_off_from_end_set,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(msetiterator_off_from_end_get,_wrap_MSetIterator_off_from_end_get,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_msetiterator,_wrap_new_MSetIterator,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(msetiterator_get_rank,_wrap_MSetIterator_get_rank,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_get_document,_wrap_MSetIterator_get_document,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_get_weight,_wrap_MSetIterator_get_weight,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_get_collapse_key,_wrap_MSetIterator_get_collapse_key,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_get_collapse_count,_wrap_MSetIterator_get_collapse_count,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_get_sort_key,_wrap_MSetIterator_get_sort_key,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_get_percent,_wrap_MSetIterator_get_percent,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_get_description,_wrap_MSetIterator_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_key,_wrap_MSetIterator_key,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_current,_wrap_MSetIterator_current,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_valid,_wrap_MSetIterator_valid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_rewind,_wrap_MSetIterator_rewind,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_equals,_wrap_MSetIterator_equals,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(msetiterator_get_docid,_wrap_MSetIterator_get_docid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_next,_wrap_MSetIterator_next,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(msetiterator_prev,_wrap_MSetIterator_prev,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_eset,_wrap_new_ESet,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(eset_size,_wrap_ESet_size,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(eset_is_empty,_wrap_ESet_is_empty,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(eset_get_ebound,_wrap_ESet_get_ebound,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(eset_begin,_wrap_ESet_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(eset_end,_wrap_ESet_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(eset_back,_wrap_ESet_back,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(eset_get_description,_wrap_ESet_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(esetiterator_eset_set,_wrap_ESetIterator_eset_set,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(esetiterator_eset_get,_wrap_ESetIterator_eset_get,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(esetiterator_off_from_end_set,_wrap_ESetIterator_off_from_end_set,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(esetiterator_off_from_end_get,_wrap_ESetIterator_off_from_end_get,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_esetiterator,_wrap_new_ESetIterator,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(esetiterator_get_weight,_wrap_ESetIterator_get_weight,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(esetiterator_get_description,_wrap_ESetIterator_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(esetiterator_key,_wrap_ESetIterator_key,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(esetiterator_current,_wrap_ESetIterator_current,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(esetiterator_valid,_wrap_ESetIterator_valid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(esetiterator_rewind,_wrap_ESetIterator_rewind,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(esetiterator_equals,_wrap_ESetIterator_equals,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(esetiterator_get_term,_wrap_ESetIterator_get_term,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(esetiterator_next,_wrap_ESetIterator_next,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(esetiterator_prev,_wrap_ESetIterator_prev,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_rset,_wrap_new_RSet,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(rset_size,_wrap_RSet_size,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(rset_is_empty,_wrap_RSet_is_empty,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(rset_add_document,_wrap_RSet_add_document,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(rset_remove_document,_wrap_RSet_remove_document,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(rset_contains,_wrap_RSet_contains,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(rset_get_description,_wrap_RSet_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_matchdecider,_wrap_new_MatchDecider,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(matchdecider_apply,_wrap_MatchDecider_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(new_enquire,_wrap_new_Enquire,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(enquire_set_query,_wrap_Enquire_set_query,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(enquire_get_query,_wrap_Enquire_get_query,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(enquire_add_matchspy,_wrap_Enquire_add_matchspy,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(enquire_clear_matchspies,_wrap_Enquire_clear_matchspies,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(enquire_set_weighting_scheme,_wrap_Enquire_set_weighting_scheme,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(enquire_set_expansion_scheme,_wrap_Enquire_set_expansion_scheme,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(enquire_set_collapse_key,_wrap_Enquire_set_collapse_key,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(enquire_set_docid_order,_wrap_Enquire_set_docid_order,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(enquire_set_cutoff,_wrap_Enquire_set_cutoff,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(enquire_set_sort_by_relevance,_wrap_Enquire_set_sort_by_relevance,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(enquire_set_sort_by_value,_wrap_Enquire_set_sort_by_value,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(enquire_set_sort_by_key,_wrap_Enquire_set_sort_by_key,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(enquire_set_sort_by_value_then_relevance,_wrap_Enquire_set_sort_by_value_then_relevance,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(enquire_set_sort_by_key_then_relevance,_wrap_Enquire_set_sort_by_key_then_relevance,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(enquire_set_sort_by_relevance_then_value,_wrap_Enquire_set_sort_by_relevance_then_value,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(enquire_set_sort_by_relevance_then_key,_wrap_Enquire_set_sort_by_relevance_then_key,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(enquire_set_time_limit,_wrap_Enquire_set_time_limit,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(enquire_get_mset,_wrap_Enquire_get_mset,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(enquire_get_eset,_wrap_Enquire_get_eset,swig_arginfo_00000)
 SWIG_ZEND_NAMED_FE(enquire_get_matching_terms_begin,_wrap_Enquire_get_matching_terms_begin,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(enquire_get_matching_terms_end,_wrap_Enquire_get_matching_terms_end,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(enquire_get_description,_wrap_Enquire_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(enquire_get_matching_terms,_wrap_Enquire_get_matching_terms,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(new_expanddecider,_wrap_new_ExpandDecider,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(expanddecider_apply,_wrap_ExpandDecider_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(expanddecider_release,_wrap_ExpandDecider_release,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_expanddeciderand,_wrap_new_ExpandDeciderAnd,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(expanddeciderand_apply,_wrap_ExpandDeciderAnd_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(new_expanddeciderfilterprefix,_wrap_new_ExpandDeciderFilterPrefix,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(expanddeciderfilterprefix_apply,_wrap_ExpandDeciderFilterPrefix_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(new_keymaker,_wrap_new_KeyMaker,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(keymaker_apply,_wrap_KeyMaker_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(keymaker_release,_wrap_KeyMaker_release,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_multivaluekeymaker,_wrap_new_MultiValueKeyMaker,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(multivaluekeymaker_apply,_wrap_MultiValueKeyMaker_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(multivaluekeymaker_add_value,_wrap_MultiValueKeyMaker_add_value,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(new_stopper,_wrap_new_Stopper,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(stopper_apply,_wrap_Stopper_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(stopper_get_description,_wrap_Stopper_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(stopper_release,_wrap_Stopper_release,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(simplestopper_add,_wrap_SimpleStopper_add,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(simplestopper_apply,_wrap_SimpleStopper_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(simplestopper_get_description,_wrap_SimpleStopper_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_simplestopper,_wrap_new_SimpleStopper,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_rangeprocessor,_wrap_new_RangeProcessor,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(rangeprocessor_check_range,_wrap_RangeProcessor_check_range,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(rangeprocessor_apply,_wrap_RangeProcessor_apply,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(rangeprocessor_release,_wrap_RangeProcessor_release,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_daterangeprocessor,_wrap_new_DateRangeProcessor,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(daterangeprocessor_apply,_wrap_DateRangeProcessor_apply,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(new_numberrangeprocessor,_wrap_new_NumberRangeProcessor,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(numberrangeprocessor_apply,_wrap_NumberRangeProcessor_apply,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(new_valuerangeprocessor,_wrap_new_ValueRangeProcessor,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(valuerangeprocessor_apply,_wrap_ValueRangeProcessor_apply,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(valuerangeprocessor_release,_wrap_ValueRangeProcessor_release,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_stringvaluerangeprocessor,_wrap_new_StringValueRangeProcessor,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(stringvaluerangeprocessor_apply,_wrap_StringValueRangeProcessor_apply,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(new_datevaluerangeprocessor,_wrap_new_DateValueRangeProcessor,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(datevaluerangeprocessor_apply,_wrap_DateValueRangeProcessor_apply,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(new_numbervaluerangeprocessor,_wrap_new_NumberValueRangeProcessor,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(numbervaluerangeprocessor_apply,_wrap_NumberValueRangeProcessor_apply,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(new_fieldprocessor,_wrap_new_FieldProcessor,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(fieldprocessor_apply,_wrap_FieldProcessor_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(fieldprocessor_release,_wrap_FieldProcessor_release,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_queryparser,_wrap_new_QueryParser,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(queryparser_set_stemmer,_wrap_QueryParser_set_stemmer,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_set_stemming_strategy,_wrap_QueryParser_set_stemming_strategy,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_set_stopper,_wrap_QueryParser_set_stopper,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(queryparser_set_default_op,_wrap_QueryParser_set_default_op,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_get_default_op,_wrap_QueryParser_get_default_op,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(queryparser_set_database,_wrap_QueryParser_set_database,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_set_max_expansion,_wrap_QueryParser_set_max_expansion,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_set_max_wildcard_expansion,_wrap_QueryParser_set_max_wildcard_expansion,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_parse_query,_wrap_QueryParser_parse_query,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_add_prefix,_wrap_QueryParser_add_prefix,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(queryparser_add_boolean_prefix,_wrap_QueryParser_add_boolean_prefix,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(queryparser_stoplist_begin,_wrap_QueryParser_stoplist_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(queryparser_stoplist_end,_wrap_QueryParser_stoplist_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(queryparser_unstem_begin,_wrap_QueryParser_unstem_begin,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_unstem_end,_wrap_QueryParser_unstem_end,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_add_rangeprocessor,_wrap_QueryParser_add_rangeprocessor,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_add_valuerangeprocessor,_wrap_QueryParser_add_valuerangeprocessor,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(queryparser_get_corrected_query_string,_wrap_QueryParser_get_corrected_query_string,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(queryparser_get_description,_wrap_QueryParser_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(sortable_serialise,_wrap_sortable_serialise,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(sortable_unserialise,_wrap_sortable_unserialise,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_valuesetmatchdecider,_wrap_new_ValueSetMatchDecider,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuesetmatchdecider_add_value,_wrap_ValueSetMatchDecider_add_value,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuesetmatchdecider_remove_value,_wrap_ValueSetMatchDecider_remove_value,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuesetmatchdecider_apply,_wrap_ValueSetMatchDecider_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(weight_name,_wrap_Weight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(weight_get_sumpart,_wrap_Weight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(weight_get_maxpart,_wrap_Weight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(weight_get_sumextra,_wrap_Weight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(weight_get_maxextra,_wrap_Weight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_boolweight,_wrap_new_BoolWeight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(boolweight_name,_wrap_BoolWeight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(boolweight_get_sumpart,_wrap_BoolWeight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(boolweight_get_maxpart,_wrap_BoolWeight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(boolweight_get_sumextra,_wrap_BoolWeight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(boolweight_get_maxextra,_wrap_BoolWeight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_tfidfweight,_wrap_new_TfIdfWeight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(tfidfweight_name,_wrap_TfIdfWeight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(tfidfweight_get_sumpart,_wrap_TfIdfWeight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(tfidfweight_get_maxpart,_wrap_TfIdfWeight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(tfidfweight_get_sumextra,_wrap_TfIdfWeight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(tfidfweight_get_maxextra,_wrap_TfIdfWeight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_bm25weight,_wrap_new_BM25Weight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(bm25weight_name,_wrap_BM25Weight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(bm25weight_get_sumpart,_wrap_BM25Weight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(bm25weight_get_maxpart,_wrap_BM25Weight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(bm25weight_get_sumextra,_wrap_BM25Weight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(bm25weight_get_maxextra,_wrap_BM25Weight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_bm25plusweight,_wrap_new_BM25PlusWeight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(bm25plusweight_name,_wrap_BM25PlusWeight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(bm25plusweight_get_sumpart,_wrap_BM25PlusWeight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(bm25plusweight_get_maxpart,_wrap_BM25PlusWeight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(bm25plusweight_get_sumextra,_wrap_BM25PlusWeight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(bm25plusweight_get_maxextra,_wrap_BM25PlusWeight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_tradweight,_wrap_new_TradWeight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(tradweight_name,_wrap_TradWeight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(tradweight_get_sumpart,_wrap_TradWeight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(tradweight_get_maxpart,_wrap_TradWeight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(tradweight_get_sumextra,_wrap_TradWeight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(tradweight_get_maxextra,_wrap_TradWeight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_inl2weight,_wrap_new_InL2Weight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(inl2weight_name,_wrap_InL2Weight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(inl2weight_get_sumpart,_wrap_InL2Weight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(inl2weight_get_maxpart,_wrap_InL2Weight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(inl2weight_get_sumextra,_wrap_InL2Weight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(inl2weight_get_maxextra,_wrap_InL2Weight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_ifb2weight,_wrap_new_IfB2Weight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(ifb2weight_name,_wrap_IfB2Weight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(ifb2weight_get_sumpart,_wrap_IfB2Weight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(ifb2weight_get_maxpart,_wrap_IfB2Weight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(ifb2weight_get_sumextra,_wrap_IfB2Weight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(ifb2weight_get_maxextra,_wrap_IfB2Weight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_ineb2weight,_wrap_new_IneB2Weight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(ineb2weight_name,_wrap_IneB2Weight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(ineb2weight_get_sumpart,_wrap_IneB2Weight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(ineb2weight_get_maxpart,_wrap_IneB2Weight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(ineb2weight_get_sumextra,_wrap_IneB2Weight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(ineb2weight_get_maxextra,_wrap_IneB2Weight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_bb2weight,_wrap_new_BB2Weight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(bb2weight_name,_wrap_BB2Weight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(bb2weight_get_sumpart,_wrap_BB2Weight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(bb2weight_get_maxpart,_wrap_BB2Weight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(bb2weight_get_sumextra,_wrap_BB2Weight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(bb2weight_get_maxextra,_wrap_BB2Weight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_dlhweight,_wrap_new_DLHWeight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(dlhweight_name,_wrap_DLHWeight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(dlhweight_get_sumpart,_wrap_DLHWeight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(dlhweight_get_maxpart,_wrap_DLHWeight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(dlhweight_get_sumextra,_wrap_DLHWeight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(dlhweight_get_maxextra,_wrap_DLHWeight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_pl2weight,_wrap_new_PL2Weight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(pl2weight_name,_wrap_PL2Weight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(pl2weight_get_sumpart,_wrap_PL2Weight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(pl2weight_get_maxpart,_wrap_PL2Weight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(pl2weight_get_sumextra,_wrap_PL2Weight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(pl2weight_get_maxextra,_wrap_PL2Weight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_pl2plusweight,_wrap_new_PL2PlusWeight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(pl2plusweight_name,_wrap_PL2PlusWeight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(pl2plusweight_get_sumpart,_wrap_PL2PlusWeight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(pl2plusweight_get_maxpart,_wrap_PL2PlusWeight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(pl2plusweight_get_sumextra,_wrap_PL2PlusWeight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(pl2plusweight_get_maxextra,_wrap_PL2PlusWeight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_dphweight,_wrap_new_DPHWeight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(dphweight_name,_wrap_DPHWeight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(dphweight_get_sumpart,_wrap_DPHWeight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(dphweight_get_maxpart,_wrap_DPHWeight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(dphweight_get_sumextra,_wrap_DPHWeight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(dphweight_get_maxextra,_wrap_DPHWeight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_lmweight,_wrap_new_LMWeight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(lmweight_name,_wrap_LMWeight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(lmweight_get_sumpart,_wrap_LMWeight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(lmweight_get_maxpart,_wrap_LMWeight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(lmweight_get_sumextra,_wrap_LMWeight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(lmweight_get_maxextra,_wrap_LMWeight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(coordweight_init,_wrap_CoordWeight_init,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(new_coordweight,_wrap_new_CoordWeight,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(coordweight_name,_wrap_CoordWeight_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(coordweight_get_sumpart,_wrap_CoordWeight_get_sumpart,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(coordweight_get_maxpart,_wrap_CoordWeight_get_maxpart,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(coordweight_get_sumextra,_wrap_CoordWeight_get_sumextra,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(coordweight_get_maxextra,_wrap_CoordWeight_get_maxextra,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_compactor,_wrap_new_Compactor,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(compactor_set_block_size,_wrap_Compactor_set_block_size,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(compactor_set_renumber,_wrap_Compactor_set_renumber,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(compactor_set_multipass,_wrap_Compactor_set_multipass,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(compactor_set_compaction_level,_wrap_Compactor_set_compaction_level,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(compactor_set_destdir,_wrap_Compactor_set_destdir,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(compactor_add_source,_wrap_Compactor_add_source,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(compactor_compact,_wrap_Compactor_compact,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(compactor_set_status,_wrap_Compactor_set_status,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(compactor_resolve_duplicate_metadata,_wrap_Compactor_resolve_duplicate_metadata,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(new_postingsource,_wrap_new_PostingSource,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(postingsource_get_termfreq_min,_wrap_PostingSource_get_termfreq_min,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingsource_get_termfreq_est,_wrap_PostingSource_get_termfreq_est,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingsource_get_termfreq_max,_wrap_PostingSource_get_termfreq_max,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingsource_set_maxweight,_wrap_PostingSource_set_maxweight,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(postingsource_get_maxweight,_wrap_PostingSource_get_maxweight,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingsource_get_weight,_wrap_PostingSource_get_weight,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingsource_get_docid,_wrap_PostingSource_get_docid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingsource_next,_wrap_PostingSource_next,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(postingsource_skip_to,_wrap_PostingSource_skip_to,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(postingsource_check,_wrap_PostingSource_check,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(postingsource_at_end,_wrap_PostingSource_at_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingsource_name,_wrap_PostingSource_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingsource_init,_wrap_PostingSource_init,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(postingsource_get_description,_wrap_PostingSource_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(postingsource_release,_wrap_PostingSource_release,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_valuepostingsource,_wrap_new_ValuePostingSource,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_get_termfreq_min,_wrap_ValuePostingSource_get_termfreq_min,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_get_termfreq_est,_wrap_ValuePostingSource_get_termfreq_est,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_get_termfreq_max,_wrap_ValuePostingSource_get_termfreq_max,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_next,_wrap_ValuePostingSource_next,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuepostingsource_skip_to,_wrap_ValuePostingSource_skip_to,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(valuepostingsource_check,_wrap_ValuePostingSource_check,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(valuepostingsource_at_end,_wrap_ValuePostingSource_at_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_get_docid,_wrap_ValuePostingSource_get_docid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_init,_wrap_ValuePostingSource_init,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuepostingsource_get_database,_wrap_ValuePostingSource_get_database,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_get_slot,_wrap_ValuePostingSource_get_slot,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_get_value,_wrap_ValuePostingSource_get_value,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_done,_wrap_ValuePostingSource_done,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_get_started,_wrap_ValuePostingSource_get_started,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuepostingsource_set_termfreq_min,_wrap_ValuePostingSource_set_termfreq_min,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuepostingsource_set_termfreq_est,_wrap_ValuePostingSource_set_termfreq_est,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuepostingsource_set_termfreq_max,_wrap_ValuePostingSource_set_termfreq_max,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(new_valueweightpostingsource,_wrap_new_ValueWeightPostingSource,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueweightpostingsource_get_weight,_wrap_ValueWeightPostingSource_get_weight,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueweightpostingsource_name,_wrap_ValueWeightPostingSource_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valueweightpostingsource_init,_wrap_ValueWeightPostingSource_init,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valueweightpostingsource_get_description,_wrap_ValueWeightPostingSource_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_decreasingvalueweightpostingsource,_wrap_new_DecreasingValueWeightPostingSource,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(decreasingvalueweightpostingsource_get_weight,_wrap_DecreasingValueWeightPostingSource_get_weight,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(decreasingvalueweightpostingsource_name,_wrap_DecreasingValueWeightPostingSource_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(decreasingvalueweightpostingsource_init,_wrap_DecreasingValueWeightPostingSource_init,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(decreasingvalueweightpostingsource_next,_wrap_DecreasingValueWeightPostingSource_next,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(decreasingvalueweightpostingsource_skip_to,_wrap_DecreasingValueWeightPostingSource_skip_to,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(decreasingvalueweightpostingsource_check,_wrap_DecreasingValueWeightPostingSource_check,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(decreasingvalueweightpostingsource_get_description,_wrap_DecreasingValueWeightPostingSource_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_valuemappostingsource,_wrap_new_ValueMapPostingSource,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuemappostingsource_add_mapping,_wrap_ValueMapPostingSource_add_mapping,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(valuemappostingsource_clear_mappings,_wrap_ValueMapPostingSource_clear_mappings,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuemappostingsource_set_default_weight,_wrap_ValueMapPostingSource_set_default_weight,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuemappostingsource_get_weight,_wrap_ValueMapPostingSource_get_weight,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuemappostingsource_name,_wrap_ValueMapPostingSource_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuemappostingsource_init,_wrap_ValueMapPostingSource_init,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuemappostingsource_get_description,_wrap_ValueMapPostingSource_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_fixedweightpostingsource,_wrap_new_FixedWeightPostingSource,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_get_termfreq_min,_wrap_FixedWeightPostingSource_get_termfreq_min,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_get_termfreq_est,_wrap_FixedWeightPostingSource_get_termfreq_est,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_get_termfreq_max,_wrap_FixedWeightPostingSource_get_termfreq_max,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_get_weight,_wrap_FixedWeightPostingSource_get_weight,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_next,_wrap_FixedWeightPostingSource_next,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_skip_to,_wrap_FixedWeightPostingSource_skip_to,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_check,_wrap_FixedWeightPostingSource_check,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_at_end,_wrap_FixedWeightPostingSource_at_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_get_docid,_wrap_FixedWeightPostingSource_get_docid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_name,_wrap_FixedWeightPostingSource_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_init,_wrap_FixedWeightPostingSource_init,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(fixedweightpostingsource_get_description,_wrap_FixedWeightPostingSource_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_matchspy,_wrap_new_MatchSpy,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(matchspy_apply,_wrap_MatchSpy_apply,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(matchspy_name,_wrap_MatchSpy_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(matchspy_merge_results,_wrap_MatchSpy_merge_results,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(matchspy_get_description,_wrap_MatchSpy_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(matchspy_release,_wrap_MatchSpy_release,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_valuecountmatchspy,_wrap_new_ValueCountMatchSpy,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuecountmatchspy_get_total,_wrap_ValueCountMatchSpy_get_total,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuecountmatchspy_values_begin,_wrap_ValueCountMatchSpy_values_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuecountmatchspy_values_end,_wrap_ValueCountMatchSpy_values_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuecountmatchspy_top_values_begin,_wrap_ValueCountMatchSpy_top_values_begin,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuecountmatchspy_top_values_end,_wrap_ValueCountMatchSpy_top_values_end,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuecountmatchspy_apply,_wrap_ValueCountMatchSpy_apply,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(valuecountmatchspy_name,_wrap_ValueCountMatchSpy_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(valuecountmatchspy_merge_results,_wrap_ValueCountMatchSpy_merge_results,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(valuecountmatchspy_get_description,_wrap_ValueCountMatchSpy_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(miles_to_metres,_wrap_miles_to_metres,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(metres_to_miles,_wrap_metres_to_miles,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoord_latitude_set,_wrap_LatLongCoord_latitude_set,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(latlongcoord_latitude_get,_wrap_LatLongCoord_latitude_get,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoord_longitude_set,_wrap_LatLongCoord_longitude_set,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(latlongcoord_longitude_get,_wrap_LatLongCoord_longitude_get,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_latlongcoord,_wrap_new_LatLongCoord,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(latlongcoord_unserialise,_wrap_LatLongCoord_unserialise,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(latlongcoord_serialise,_wrap_LatLongCoord_serialise,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoord_get_description,_wrap_LatLongCoord_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_latlongcoordsiterator,_wrap_new_LatLongCoordsIterator,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(latlongcoordsiterator_equals,_wrap_LatLongCoordsIterator_equals,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(latlongcoordsiterator_get_coord,_wrap_LatLongCoordsIterator_get_coord,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoordsiterator_next,_wrap_LatLongCoordsIterator_next,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoords_begin,_wrap_LatLongCoords_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoords_end,_wrap_LatLongCoords_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoords_size,_wrap_LatLongCoords_size,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoords_is_empty,_wrap_LatLongCoords_is_empty,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoords_append,_wrap_LatLongCoords_append,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(new_latlongcoords,_wrap_new_LatLongCoords,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoords_unserialise,_wrap_LatLongCoords_unserialise,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(latlongcoords_serialise,_wrap_LatLongCoords_serialise,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongcoords_get_description,_wrap_LatLongCoords_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongmetric_pointwise_distance,_wrap_LatLongMetric_pointwise_distance,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(latlongmetric_apply,_wrap_LatLongMetric_apply,swig_arginfo_0000)
 SWIG_ZEND_NAMED_FE(latlongmetric_name,_wrap_LatLongMetric_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_latlongmetric,_wrap_new_LatLongMetric,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(new_greatcirclemetric,_wrap_new_GreatCircleMetric,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(greatcirclemetric_pointwise_distance,_wrap_GreatCircleMetric_pointwise_distance,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(greatcirclemetric_name,_wrap_GreatCircleMetric_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_latlongdistancepostingsource,_wrap_new_LatLongDistancePostingSource,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(latlongdistancepostingsource_next,_wrap_LatLongDistancePostingSource_next,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(latlongdistancepostingsource_skip_to,_wrap_LatLongDistancePostingSource_skip_to,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(latlongdistancepostingsource_check,_wrap_LatLongDistancePostingSource_check,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(latlongdistancepostingsource_get_weight,_wrap_LatLongDistancePostingSource_get_weight,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongdistancepostingsource_name,_wrap_LatLongDistancePostingSource_name,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(latlongdistancepostingsource_init,_wrap_LatLongDistancePostingSource_init,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(latlongdistancepostingsource_get_description,_wrap_LatLongDistancePostingSource_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(new_latlongdistancekeymaker,_wrap_new_LatLongDistanceKeyMaker,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(latlongdistancekeymaker_apply,_wrap_LatLongDistanceKeyMaker_apply,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_add_database,_wrap_Database_add_database,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(new_database,_wrap_new_Database,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_reopen,_wrap_Database_reopen,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_close,_wrap_Database_close,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_description,_wrap_Database_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_postlist_begin,_wrap_Database_postlist_begin,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_postlist_end,_wrap_Database_postlist_end,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_termlist_begin,_wrap_Database_termlist_begin,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_termlist_end,_wrap_Database_termlist_end,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_has_positions,_wrap_Database_has_positions,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_positionlist_begin,_wrap_Database_positionlist_begin,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(database_positionlist_end,_wrap_Database_positionlist_end,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(database_allterms_begin,_wrap_Database_allterms_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_allterms_end,_wrap_Database_allterms_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_doccount,_wrap_Database_get_doccount,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_lastdocid,_wrap_Database_get_lastdocid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_avlength,_wrap_Database_get_avlength,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_total_length,_wrap_Database_get_total_length,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_termfreq,_wrap_Database_get_termfreq,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_term_exists,_wrap_Database_term_exists,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_get_collection_freq,_wrap_Database_get_collection_freq,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_get_value_freq,_wrap_Database_get_value_freq,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_get_value_lower_bound,_wrap_Database_get_value_lower_bound,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_get_value_upper_bound,_wrap_Database_get_value_upper_bound,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_get_doclength_lower_bound,_wrap_Database_get_doclength_lower_bound,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_doclength_upper_bound,_wrap_Database_get_doclength_upper_bound,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_wdf_upper_bound,_wrap_Database_get_wdf_upper_bound,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_valuestream_begin,_wrap_Database_valuestream_begin,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_valuestream_end,_wrap_Database_valuestream_end,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_get_doclength,_wrap_Database_get_doclength,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_get_unique_terms,_wrap_Database_get_unique_terms,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_keep_alive,_wrap_Database_keep_alive,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_document,_wrap_Database_get_document,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(database_get_spelling_suggestion,_wrap_Database_get_spelling_suggestion,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_spellings_begin,_wrap_Database_spellings_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_spellings_end,_wrap_Database_spellings_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_synonyms_begin,_wrap_Database_synonyms_begin,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_synonyms_end,_wrap_Database_synonyms_end,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_synonym_keys_begin,_wrap_Database_synonym_keys_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_synonym_keys_end,_wrap_Database_synonym_keys_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_metadata,_wrap_Database_get_metadata,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(database_metadata_keys_begin,_wrap_Database_metadata_keys_begin,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_metadata_keys_end,_wrap_Database_metadata_keys_end,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_uuid,_wrap_Database_get_uuid,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_locked,_wrap_Database_locked,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_get_revision,_wrap_Database_get_revision,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_check,_wrap_Database_check,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(database_compact,_wrap_Database_compact,swig_arginfo_00000)
 SWIG_ZEND_NAMED_FE(new_writabledatabase,_wrap_new_WritableDatabase,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(writabledatabase_commit,_wrap_WritableDatabase_commit,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(writabledatabase_flush,_wrap_WritableDatabase_flush,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(writabledatabase_begin_transaction,_wrap_WritableDatabase_begin_transaction,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(writabledatabase_commit_transaction,_wrap_WritableDatabase_commit_transaction,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(writabledatabase_cancel_transaction,_wrap_WritableDatabase_cancel_transaction,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(writabledatabase_add_document,_wrap_WritableDatabase_add_document,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(writabledatabase_delete_document,_wrap_WritableDatabase_delete_document,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(writabledatabase_replace_document,_wrap_WritableDatabase_replace_document,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(writabledatabase_add_spelling,_wrap_WritableDatabase_add_spelling,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(writabledatabase_remove_spelling,_wrap_WritableDatabase_remove_spelling,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(writabledatabase_add_synonym,_wrap_WritableDatabase_add_synonym,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(writabledatabase_remove_synonym,_wrap_WritableDatabase_remove_synonym,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(writabledatabase_clear_synonyms,_wrap_WritableDatabase_clear_synonyms,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(writabledatabase_set_metadata,_wrap_WritableDatabase_set_metadata,swig_arginfo_000)
 SWIG_ZEND_NAMED_FE(writabledatabase_get_description,_wrap_WritableDatabase_get_description,swig_arginfo_0)
 SWIG_ZEND_NAMED_FE(auto_open_stub,_wrap_auto_open_stub,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(inmemory_open,_wrap_inmemory_open,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(chert_open,_wrap_chert_open,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(remote_open,_wrap_remote_open,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(remote_open_writable,_wrap_remote_open_writable,swig_arginfo_00)
 SWIG_ZEND_NAMED_FE(bad_valueno_get,_wrap_BAD_VALUENO_get,swig_arginfo_)
 SWIG_ZEND_NAMED_FE(swig_xapian_alter_newobject,_wrap_swig_xapian_alter_newobject,NULL)
 SWIG_ZEND_NAMED_FE(swig_xapian_get_newobject,_wrap_swig_xapian_get_newobject,NULL)
 ZEND_FE_END
};

/* init section */
#if ZEND_MODULE_API_NO <= 20090626
#undef ZEND_MODULE_BUILD_ID
#define ZEND_MODULE_BUILD_ID (char*)"API" ZEND_TOSTR(ZEND_MODULE_API_NO) ZEND_BUILD_TS ZEND_BUILD_DEBUG ZEND_BUILD_SYSTEM ZEND_BUILD_EXTRA
#endif
zend_module_entry xapian_module_entry = {
    STANDARD_MODULE_HEADER,
    (char*)"xapian",
    xapian_functions,
    PHP_MINIT(xapian),
    PHP_MSHUTDOWN(xapian),
    PHP_RINIT(xapian),
    PHP_RSHUTDOWN(xapian),
    PHP_MINFO(xapian),
    NO_VERSION_YET,
    STANDARD_MODULE_PROPERTIES
};
zend_module_entry* SWIG_module_entry = &xapian_module_entry;

#ifdef __cplusplus
extern "C" {
#endif
SWIGEXPORT zend_module_entry *get_module(void) { return &xapian_module_entry; }
#ifdef __cplusplus
}
#endif

#define SWIG_php_minit PHP_MINIT_FUNCTION(xapian)
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic
 * memory is used. Also, since swig_type_info structures store pointers to
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization.
 * The idea is that swig generates all the structures that are needed.
 * The runtime then collects these partially filled structures.
 * The SWIG_InitializeModule function takes these initial arrays out of
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned statically to an initial
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded.
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int init;

  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }

  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);

    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }

  /* When multiple interpreters are used, a module could have already been initialized in
     a different interpreter, but not yet have a pointer in this interpreter.
     In this case, we do not want to continue adding types... everything should be
     set up already */
  if (init == 0) return;

  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %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


SWIG_php_minit {
    SWIG_InitializeModule(0);

/* oinit subsection */
ZEND_INIT_MODULE_GLOBALS(xapian, xapian_init_globals, NULL);

/* Register resource destructors for pointer types */
le_swig__p_Xapian__ESetIterator=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ESetIterator, NULL, (char *)SWIGTYPE_p_Xapian__ESetIterator->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ESetIterator,&le_swig__p_Xapian__ESetIterator);
le_swig__p_Xapian__MSetIterator=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__MSetIterator, NULL, (char *)SWIGTYPE_p_Xapian__MSetIterator->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__MSetIterator,&le_swig__p_Xapian__MSetIterator);
le_swig__p_Xapian__PositionIterator=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__PositionIterator, NULL, (char *)SWIGTYPE_p_Xapian__PositionIterator->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__PositionIterator,&le_swig__p_Xapian__PositionIterator);
le_swig__p_Xapian__PostingIterator=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__PostingIterator, NULL, (char *)SWIGTYPE_p_Xapian__PostingIterator->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__PostingIterator,&le_swig__p_Xapian__PostingIterator);
le_swig__p_Xapian__TermIterator=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__TermIterator, NULL, (char *)SWIGTYPE_p_Xapian__TermIterator->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__TermIterator,&le_swig__p_Xapian__TermIterator);
le_swig__p_Xapian__ValueIterator=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ValueIterator, NULL, (char *)SWIGTYPE_p_Xapian__ValueIterator->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueIterator,&le_swig__p_Xapian__ValueIterator);
le_swig__p_Xapian__TermGenerator=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__TermGenerator, NULL, (char *)SWIGTYPE_p_Xapian__TermGenerator->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__TermGenerator,&le_swig__p_Xapian__TermGenerator);
le_swig__p_Xapian__Document=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__Document, NULL, (char *)SWIGTYPE_p_Xapian__Document->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__Document,&le_swig__p_Xapian__Document);
le_swig__p_Xapian__LatLongCoordsIterator=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__LatLongCoordsIterator, NULL, (char *)SWIGTYPE_p_Xapian__LatLongCoordsIterator->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoordsIterator,&le_swig__p_Xapian__LatLongCoordsIterator);
le_swig__p_Xapian__StemImplementation=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__StemImplementation, NULL, (char *)SWIGTYPE_p_Xapian__StemImplementation->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__StemImplementation,&le_swig__p_Xapian__StemImplementation);
le_swig__p_Xapian__Registry=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__Registry, NULL, (char *)SWIGTYPE_p_Xapian__Registry->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__Registry,&le_swig__p_Xapian__Registry);
le_swig__p_Xapian__Database=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__Database, NULL, (char *)SWIGTYPE_p_Xapian__Database->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__Database,&le_swig__p_Xapian__Database);
le_swig__p_Xapian__WritableDatabase=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__WritableDatabase, NULL, (char *)SWIGTYPE_p_Xapian__WritableDatabase->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__WritableDatabase,&le_swig__p_Xapian__WritableDatabase);
le_swig__p_Xapian__LatLongMetric=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__LatLongMetric, NULL, (char *)SWIGTYPE_p_Xapian__LatLongMetric->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongMetric,&le_swig__p_Xapian__LatLongMetric);
le_swig__p_Xapian__GreatCircleMetric=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__GreatCircleMetric, NULL, (char *)SWIGTYPE_p_Xapian__GreatCircleMetric->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__GreatCircleMetric,&le_swig__p_Xapian__GreatCircleMetric);
le_swig__p_Xapian__Compactor=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__Compactor, NULL, (char *)SWIGTYPE_p_Xapian__Compactor->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__Compactor,&le_swig__p_Xapian__Compactor);
le_swig__p_Xapian__LMWeight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__LMWeight, NULL, (char *)SWIGTYPE_p_Xapian__LMWeight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__LMWeight,&le_swig__p_Xapian__LMWeight);
le_swig__p_Xapian__PL2PlusWeight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__PL2PlusWeight, NULL, (char *)SWIGTYPE_p_Xapian__PL2PlusWeight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__PL2PlusWeight,&le_swig__p_Xapian__PL2PlusWeight);
le_swig__p_Xapian__BM25PlusWeight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__BM25PlusWeight, NULL, (char *)SWIGTYPE_p_Xapian__BM25PlusWeight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__BM25PlusWeight,&le_swig__p_Xapian__BM25PlusWeight);
le_swig__p_Xapian__BM25Weight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__BM25Weight, NULL, (char *)SWIGTYPE_p_Xapian__BM25Weight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__BM25Weight,&le_swig__p_Xapian__BM25Weight);
le_swig__p_Xapian__Weight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__Weight, NULL, (char *)SWIGTYPE_p_Xapian__Weight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__Weight,&le_swig__p_Xapian__Weight);
le_swig__p_Xapian__ValueSetMatchDecider=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ValueSetMatchDecider, NULL, (char *)SWIGTYPE_p_Xapian__ValueSetMatchDecider->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueSetMatchDecider,&le_swig__p_Xapian__ValueSetMatchDecider);
le_swig__p_Xapian__MatchDecider=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__MatchDecider, NULL, (char *)SWIGTYPE_p_Xapian__MatchDecider->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__MatchDecider,&le_swig__p_Xapian__MatchDecider);
le_swig__p_Xapian__ExpandDecider=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ExpandDecider, NULL, (char *)SWIGTYPE_p_Xapian__ExpandDecider->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDecider,&le_swig__p_Xapian__ExpandDecider);
le_swig__p_Xapian__LatLongCoord=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__LatLongCoord, NULL, (char *)SWIGTYPE_p_Xapian__LatLongCoord->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoord,&le_swig__p_Xapian__LatLongCoord);
le_swig__p_Xapian__Enquire=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__Enquire, NULL, (char *)SWIGTYPE_p_Xapian__Enquire->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__Enquire,&le_swig__p_Xapian__Enquire);
le_swig__p_Xapian__ESet=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ESet, NULL, (char *)SWIGTYPE_p_Xapian__ESet->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ESet,&le_swig__p_Xapian__ESet);
le_swig__p_feature_flag=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_feature_flag->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_feature_flag,&le_swig__p_feature_flag);
le_swig__p_Xapian__Query=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__Query, NULL, (char *)SWIGTYPE_p_Xapian__Query->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__Query,&le_swig__p_Xapian__Query);
le_swig__p_Xapian__MultiValueKeyMaker=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__MultiValueKeyMaker, NULL, (char *)SWIGTYPE_p_Xapian__MultiValueKeyMaker->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__MultiValueKeyMaker,&le_swig__p_Xapian__MultiValueKeyMaker);
le_swig__p_Xapian__KeyMaker=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__KeyMaker, NULL, (char *)SWIGTYPE_p_Xapian__KeyMaker->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__KeyMaker,&le_swig__p_Xapian__KeyMaker);
le_swig__p_Xapian__LatLongDistanceKeyMaker=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__LatLongDistanceKeyMaker, NULL, (char *)SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker,&le_swig__p_Xapian__LatLongDistanceKeyMaker);
le_swig__p_double=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_double->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_double,&le_swig__p_double);
le_swig__p_int=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_int->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_int,&le_swig__p_int);
le_swig__p_compaction_level=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_compaction_level->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_compaction_level,&le_swig__p_compaction_level);
le_swig__p_type_smoothing=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_type_smoothing->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_type_smoothing,&le_swig__p_type_smoothing);
le_swig__p_Xapian__RSet=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__RSet, NULL, (char *)SWIGTYPE_p_Xapian__RSet->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__RSet,&le_swig__p_Xapian__RSet);
le_swig__p_Xapian__ValueMapPostingSource=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ValueMapPostingSource, NULL, (char *)SWIGTYPE_p_Xapian__ValueMapPostingSource->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueMapPostingSource,&le_swig__p_Xapian__ValueMapPostingSource);
le_swig__p_Xapian__DecreasingValueWeightPostingSource=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__DecreasingValueWeightPostingSource, NULL, (char *)SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource,&le_swig__p_Xapian__DecreasingValueWeightPostingSource);
le_swig__p_Xapian__ValueWeightPostingSource=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ValueWeightPostingSource, NULL, (char *)SWIGTYPE_p_Xapian__ValueWeightPostingSource->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueWeightPostingSource,&le_swig__p_Xapian__ValueWeightPostingSource);
le_swig__p_Xapian__ValuePostingSource=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ValuePostingSource, NULL, (char *)SWIGTYPE_p_Xapian__ValuePostingSource->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValuePostingSource,&le_swig__p_Xapian__ValuePostingSource);
le_swig__p_Xapian__PostingSource=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__PostingSource, NULL, (char *)SWIGTYPE_p_Xapian__PostingSource->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__PostingSource,&le_swig__p_Xapian__PostingSource);
le_swig__p_Xapian__CoordWeight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__CoordWeight, NULL, (char *)SWIGTYPE_p_Xapian__CoordWeight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__CoordWeight,&le_swig__p_Xapian__CoordWeight);
le_swig__p_Xapian__DPHWeight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__DPHWeight, NULL, (char *)SWIGTYPE_p_Xapian__DPHWeight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__DPHWeight,&le_swig__p_Xapian__DPHWeight);
le_swig__p_Xapian__PL2Weight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__PL2Weight, NULL, (char *)SWIGTYPE_p_Xapian__PL2Weight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__PL2Weight,&le_swig__p_Xapian__PL2Weight);
le_swig__p_Xapian__DLHWeight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__DLHWeight, NULL, (char *)SWIGTYPE_p_Xapian__DLHWeight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__DLHWeight,&le_swig__p_Xapian__DLHWeight);
le_swig__p_Xapian__BB2Weight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__BB2Weight, NULL, (char *)SWIGTYPE_p_Xapian__BB2Weight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__BB2Weight,&le_swig__p_Xapian__BB2Weight);
le_swig__p_Xapian__IneB2Weight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__IneB2Weight, NULL, (char *)SWIGTYPE_p_Xapian__IneB2Weight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__IneB2Weight,&le_swig__p_Xapian__IneB2Weight);
le_swig__p_Xapian__IfB2Weight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__IfB2Weight, NULL, (char *)SWIGTYPE_p_Xapian__IfB2Weight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__IfB2Weight,&le_swig__p_Xapian__IfB2Weight);
le_swig__p_Xapian__InL2Weight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__InL2Weight, NULL, (char *)SWIGTYPE_p_Xapian__InL2Weight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__InL2Weight,&le_swig__p_Xapian__InL2Weight);
le_swig__p_Xapian__TradWeight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__TradWeight, NULL, (char *)SWIGTYPE_p_Xapian__TradWeight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__TradWeight,&le_swig__p_Xapian__TradWeight);
le_swig__p_Xapian__TfIdfWeight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__TfIdfWeight, NULL, (char *)SWIGTYPE_p_Xapian__TfIdfWeight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__TfIdfWeight,&le_swig__p_Xapian__TfIdfWeight);
le_swig__p_Xapian__BoolWeight=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__BoolWeight, NULL, (char *)SWIGTYPE_p_Xapian__BoolWeight->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__BoolWeight,&le_swig__p_Xapian__BoolWeight);
le_swig__p_Xapian__FixedWeightPostingSource=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__FixedWeightPostingSource, NULL, (char *)SWIGTYPE_p_Xapian__FixedWeightPostingSource->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__FixedWeightPostingSource,&le_swig__p_Xapian__FixedWeightPostingSource);
le_swig__p_Xapian__LatLongDistancePostingSource=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__LatLongDistancePostingSource, NULL, (char *)SWIGTYPE_p_Xapian__LatLongDistancePostingSource->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongDistancePostingSource,&le_swig__p_Xapian__LatLongDistancePostingSource);
le_swig__p_Xapian__MSet=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__MSet, NULL, (char *)SWIGTYPE_p_Xapian__MSet->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__MSet,&le_swig__p_Xapian__MSet);
le_swig__p_Xapian__QueryParser=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__QueryParser, NULL, (char *)SWIGTYPE_p_Xapian__QueryParser->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__QueryParser,&le_swig__p_Xapian__QueryParser);
le_swig__p_Xapian__MatchSpy=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__MatchSpy, NULL, (char *)SWIGTYPE_p_Xapian__MatchSpy->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__MatchSpy,&le_swig__p_Xapian__MatchSpy);
le_swig__p_Xapian__SimpleStopper=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__SimpleStopper, NULL, (char *)SWIGTYPE_p_Xapian__SimpleStopper->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__SimpleStopper,&le_swig__p_Xapian__SimpleStopper);
le_swig__p_Xapian__Stopper=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__Stopper, NULL, (char *)SWIGTYPE_p_Xapian__Stopper->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__Stopper,&le_swig__p_Xapian__Stopper);
le_swig__p_Xapian__ValueCountMatchSpy=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ValueCountMatchSpy, NULL, (char *)SWIGTYPE_p_Xapian__ValueCountMatchSpy->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueCountMatchSpy,&le_swig__p_Xapian__ValueCountMatchSpy);
le_swig__int=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_int->name, module_number);
SWIG_TypeClientData(SWIGTYPE_int,&le_swig__int);
le_swig__p_docid_order=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_docid_order->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_docid_order,&le_swig__p_docid_order);
le_swig__p_Xapian__FieldProcessor=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__FieldProcessor, NULL, (char *)SWIGTYPE_p_Xapian__FieldProcessor->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__FieldProcessor,&le_swig__p_Xapian__FieldProcessor);
le_swig__p_Xapian__NumberValueRangeProcessor=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__NumberValueRangeProcessor, NULL, (char *)SWIGTYPE_p_Xapian__NumberValueRangeProcessor->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__NumberValueRangeProcessor,&le_swig__p_Xapian__NumberValueRangeProcessor);
le_swig__p_Xapian__DateValueRangeProcessor=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__DateValueRangeProcessor, NULL, (char *)SWIGTYPE_p_Xapian__DateValueRangeProcessor->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__DateValueRangeProcessor,&le_swig__p_Xapian__DateValueRangeProcessor);
le_swig__p_Xapian__NumberRangeProcessor=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__NumberRangeProcessor, NULL, (char *)SWIGTYPE_p_Xapian__NumberRangeProcessor->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__NumberRangeProcessor,&le_swig__p_Xapian__NumberRangeProcessor);
le_swig__p_Xapian__DateRangeProcessor=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__DateRangeProcessor, NULL, (char *)SWIGTYPE_p_Xapian__DateRangeProcessor->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__DateRangeProcessor,&le_swig__p_Xapian__DateRangeProcessor);
le_swig__p_Xapian__StringValueRangeProcessor=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__StringValueRangeProcessor, NULL, (char *)SWIGTYPE_p_Xapian__StringValueRangeProcessor->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__StringValueRangeProcessor,&le_swig__p_Xapian__StringValueRangeProcessor);
le_swig__p_Xapian__ValueRangeProcessor=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ValueRangeProcessor, NULL, (char *)SWIGTYPE_p_Xapian__ValueRangeProcessor->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueRangeProcessor,&le_swig__p_Xapian__ValueRangeProcessor);
le_swig__p_Xapian__RangeProcessor=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__RangeProcessor, NULL, (char *)SWIGTYPE_p_Xapian__RangeProcessor->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__RangeProcessor,&le_swig__p_Xapian__RangeProcessor);
le_swig__p_Xapian__ExpandDeciderFilterPrefix=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ExpandDeciderFilterPrefix, NULL, (char *)SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix,&le_swig__p_Xapian__ExpandDeciderFilterPrefix);
le_swig__p_stem_strategy=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_stem_strategy->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_stem_strategy,&le_swig__p_stem_strategy);
le_swig__p_stop_strategy=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_stop_strategy->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_stop_strategy,&le_swig__p_stop_strategy);
le_swig__p_unsigned_long=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_unsigned_long->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_unsigned_long,&le_swig__p_unsigned_long);
le_swig__p_std__string=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_std__string->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_std__string,&le_swig__p_std__string);
le_swig__p_Xapian__Stem=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__Stem, NULL, (char *)SWIGTYPE_p_Xapian__Stem->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__Stem,&le_swig__p_Xapian__Stem);
le_swig__unsigned_int=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_unsigned_int->name, module_number);
SWIG_TypeClientData(SWIGTYPE_unsigned_int,&le_swig__unsigned_int);
le_swig__p_unsigned_int=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_unsigned_int->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_unsigned_int,&le_swig__p_unsigned_int);
le_swig__p_flags=zend_register_list_destructors_ex(_swig_default_rsrc_destroy, NULL, (char *)SWIGTYPE_p_flags->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_flags,&le_swig__p_flags);
le_swig__p_Xapian__ExpandDeciderAnd=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__ExpandDeciderAnd, NULL, (char *)SWIGTYPE_p_Xapian__ExpandDeciderAnd->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDeciderAnd,&le_swig__p_Xapian__ExpandDeciderAnd);
le_swig__p_Xapian__LatLongCoords=zend_register_list_destructors_ex(_wrap_destroy_p_Xapian__LatLongCoords, NULL, (char *)SWIGTYPE_p_Xapian__LatLongCoords->name, module_number);
SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoords,&le_swig__p_Xapian__LatLongCoords);
CG(active_class_entry) = NULL;
/* end oinit subsection */

/* cinit subsection */
SWIG_LONG_CONSTANT(BAD_VALUENO, (Xapian::valueno)Xapian::BAD_VALUENO);
SWIG_LONG_CONSTANT(DB_CREATE, (int)Xapian::DB_CREATE);
SWIG_LONG_CONSTANT(DB_CREATE_OR_OPEN, (int)Xapian::DB_CREATE_OR_OPEN);
SWIG_LONG_CONSTANT(DB_CREATE_OR_OVERWRITE, (int)Xapian::DB_CREATE_OR_OVERWRITE);
SWIG_LONG_CONSTANT(DB_OPEN, (int)Xapian::DB_OPEN);
SWIG_LONG_CONSTANT(DB_NO_SYNC, (int)Xapian::DB_NO_SYNC);
SWIG_LONG_CONSTANT(DB_FULL_SYNC, (int)Xapian::DB_FULL_SYNC);
SWIG_LONG_CONSTANT(DB_DANGEROUS, (int)Xapian::DB_DANGEROUS);
SWIG_LONG_CONSTANT(DB_NO_TERMLIST, (int)Xapian::DB_NO_TERMLIST);
SWIG_LONG_CONSTANT(DB_BACKEND_CHERT, (int)Xapian::DB_BACKEND_CHERT);
SWIG_LONG_CONSTANT(DB_BACKEND_GLASS, (int)Xapian::DB_BACKEND_GLASS);
SWIG_LONG_CONSTANT(DB_BACKEND_INMEMORY, (int)Xapian::DB_BACKEND_INMEMORY);
SWIG_LONG_CONSTANT(DB_BACKEND_STUB, (int)Xapian::DB_BACKEND_STUB);
SWIG_LONG_CONSTANT(DB_RETRY_LOCK, (int)Xapian::DB_RETRY_LOCK);
SWIG_LONG_CONSTANT(DBCHECK_SHORT_TREE, (int)Xapian::DBCHECK_SHORT_TREE);
SWIG_LONG_CONSTANT(DBCHECK_FULL_TREE, (int)Xapian::DBCHECK_FULL_TREE);
SWIG_LONG_CONSTANT(DBCHECK_SHOW_FREELIST, (int)Xapian::DBCHECK_SHOW_FREELIST);
SWIG_LONG_CONSTANT(DBCHECK_SHOW_STATS, (int)Xapian::DBCHECK_SHOW_STATS);
SWIG_LONG_CONSTANT(DBCHECK_FIX, (int)Xapian::DBCHECK_FIX);
SWIG_LONG_CONSTANT(DBCOMPACT_MULTIPASS, (int)Xapian::DBCOMPACT_MULTIPASS);
SWIG_LONG_CONSTANT(DBCOMPACT_NO_RENUMBER, (int)Xapian::DBCOMPACT_NO_RENUMBER);
SWIG_LONG_CONSTANT(DBCOMPACT_SINGLE_FILE, (int)Xapian::DBCOMPACT_SINGLE_FILE);
SWIG_LONG_CONSTANT(DOC_ASSUME_VALID, (int)Xapian::DOC_ASSUME_VALID);
SWIG_LONG_CONSTANT(Query_OP_AND, (int)Xapian::Query::OP_AND);
SWIG_LONG_CONSTANT(Query_OP_OR, (int)Xapian::Query::OP_OR);
SWIG_LONG_CONSTANT(Query_OP_AND_NOT, (int)Xapian::Query::OP_AND_NOT);
SWIG_LONG_CONSTANT(Query_OP_XOR, (int)Xapian::Query::OP_XOR);
SWIG_LONG_CONSTANT(Query_OP_AND_MAYBE, (int)Xapian::Query::OP_AND_MAYBE);
SWIG_LONG_CONSTANT(Query_OP_FILTER, (int)Xapian::Query::OP_FILTER);
SWIG_LONG_CONSTANT(Query_OP_NEAR, (int)Xapian::Query::OP_NEAR);
SWIG_LONG_CONSTANT(Query_OP_PHRASE, (int)Xapian::Query::OP_PHRASE);
SWIG_LONG_CONSTANT(Query_OP_VALUE_RANGE, (int)Xapian::Query::OP_VALUE_RANGE);
SWIG_LONG_CONSTANT(Query_OP_SCALE_WEIGHT, (int)Xapian::Query::OP_SCALE_WEIGHT);
SWIG_LONG_CONSTANT(Query_OP_ELITE_SET, (int)Xapian::Query::OP_ELITE_SET);
SWIG_LONG_CONSTANT(Query_OP_VALUE_GE, (int)Xapian::Query::OP_VALUE_GE);
SWIG_LONG_CONSTANT(Query_OP_VALUE_LE, (int)Xapian::Query::OP_VALUE_LE);
SWIG_LONG_CONSTANT(Query_OP_SYNONYM, (int)Xapian::Query::OP_SYNONYM);
SWIG_LONG_CONSTANT(Query_OP_MAX, (int)Xapian::Query::OP_MAX);
SWIG_LONG_CONSTANT(Query_OP_WILDCARD, (int)Xapian::Query::OP_WILDCARD);
SWIG_LONG_CONSTANT(Query_OP_INVALID, (int)Xapian::Query::OP_INVALID);
SWIG_LONG_CONSTANT(Query_WILDCARD_LIMIT_ERROR, (int)Xapian::Query::WILDCARD_LIMIT_ERROR);
SWIG_LONG_CONSTANT(Query_WILDCARD_LIMIT_FIRST, (int)Xapian::Query::WILDCARD_LIMIT_FIRST);
SWIG_LONG_CONSTANT(Query_WILDCARD_LIMIT_MOST_FREQUENT, (int)Xapian::Query::WILDCARD_LIMIT_MOST_FREQUENT);
SWIG_LONG_CONSTANT(TermGenerator_FLAG_SPELLING, (int)Xapian::TermGenerator::FLAG_SPELLING);
SWIG_LONG_CONSTANT(TermGenerator_FLAG_CJK_NGRAM, (int)Xapian::TermGenerator::FLAG_CJK_NGRAM);
SWIG_LONG_CONSTANT(TermGenerator_STEM_NONE, (int)Xapian::TermGenerator::STEM_NONE);
SWIG_LONG_CONSTANT(TermGenerator_STEM_SOME, (int)Xapian::TermGenerator::STEM_SOME);
SWIG_LONG_CONSTANT(TermGenerator_STEM_ALL, (int)Xapian::TermGenerator::STEM_ALL);
SWIG_LONG_CONSTANT(TermGenerator_STEM_ALL_Z, (int)Xapian::TermGenerator::STEM_ALL_Z);
SWIG_LONG_CONSTANT(TermGenerator_STEM_SOME_FULL_POS, (int)Xapian::TermGenerator::STEM_SOME_FULL_POS);
SWIG_LONG_CONSTANT(TermGenerator_STOP_NONE, (int)Xapian::TermGenerator::STOP_NONE);
SWIG_LONG_CONSTANT(TermGenerator_STOP_ALL, (int)Xapian::TermGenerator::STOP_ALL);
SWIG_LONG_CONSTANT(TermGenerator_STOP_STEMMED, (int)Xapian::TermGenerator::STOP_STEMMED);
SWIG_LONG_CONSTANT(MSet_SNIPPET_BACKGROUND_MODEL, (int)Xapian::MSet::SNIPPET_BACKGROUND_MODEL);
SWIG_LONG_CONSTANT(MSet_SNIPPET_EXHAUSTIVE, (int)Xapian::MSet::SNIPPET_EXHAUSTIVE);
SWIG_LONG_CONSTANT(MSet_SNIPPET_EMPTY_WITHOUT_MATCH, (int)Xapian::MSet::SNIPPET_EMPTY_WITHOUT_MATCH);
SWIG_LONG_CONSTANT(MSet_SNIPPET_CJK_NGRAM, (int)Xapian::MSet::SNIPPET_CJK_NGRAM);
SWIG_LONG_CONSTANT(Enquire_ASCENDING, (int)Xapian::Enquire::ASCENDING);
SWIG_LONG_CONSTANT(Enquire_DESCENDING, (int)Xapian::Enquire::DESCENDING);
SWIG_LONG_CONSTANT(Enquire_DONT_CARE, (int)Xapian::Enquire::DONT_CARE);
SWIG_LONG_CONSTANT(Enquire_INCLUDE_QUERY_TERMS, (int)Xapian::Enquire::INCLUDE_QUERY_TERMS);
SWIG_LONG_CONSTANT(Enquire_USE_EXACT_TERMFREQ, (int)Xapian::Enquire::USE_EXACT_TERMFREQ);
SWIG_LONG_CONSTANT(RP_SUFFIX, (int)Xapian::RP_SUFFIX);
SWIG_LONG_CONSTANT(RP_REPEATED, (int)Xapian::RP_REPEATED);
SWIG_LONG_CONSTANT(RP_DATE_PREFER_MDY, (int)Xapian::RP_DATE_PREFER_MDY);
SWIG_LONG_CONSTANT(QueryParser_FLAG_BOOLEAN, (int)Xapian::QueryParser::FLAG_BOOLEAN);
SWIG_LONG_CONSTANT(QueryParser_FLAG_PHRASE, (int)Xapian::QueryParser::FLAG_PHRASE);
SWIG_LONG_CONSTANT(QueryParser_FLAG_LOVEHATE, (int)Xapian::QueryParser::FLAG_LOVEHATE);
SWIG_LONG_CONSTANT(QueryParser_FLAG_BOOLEAN_ANY_CASE, (int)Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE);
SWIG_LONG_CONSTANT(QueryParser_FLAG_WILDCARD, (int)Xapian::QueryParser::FLAG_WILDCARD);
SWIG_LONG_CONSTANT(QueryParser_FLAG_PURE_NOT, (int)Xapian::QueryParser::FLAG_PURE_NOT);
SWIG_LONG_CONSTANT(QueryParser_FLAG_PARTIAL, (int)Xapian::QueryParser::FLAG_PARTIAL);
SWIG_LONG_CONSTANT(QueryParser_FLAG_SPELLING_CORRECTION, (int)Xapian::QueryParser::FLAG_SPELLING_CORRECTION);
SWIG_LONG_CONSTANT(QueryParser_FLAG_SYNONYM, (int)Xapian::QueryParser::FLAG_SYNONYM);
SWIG_LONG_CONSTANT(QueryParser_FLAG_AUTO_SYNONYMS, (int)Xapian::QueryParser::FLAG_AUTO_SYNONYMS);
SWIG_LONG_CONSTANT(QueryParser_FLAG_AUTO_MULTIWORD_SYNONYMS, (int)Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS);
SWIG_LONG_CONSTANT(QueryParser_FLAG_CJK_NGRAM, (int)Xapian::QueryParser::FLAG_CJK_NGRAM);
SWIG_LONG_CONSTANT(QueryParser_FLAG_DEFAULT, (int)Xapian::QueryParser::FLAG_DEFAULT);
SWIG_LONG_CONSTANT(QueryParser_STEM_NONE, (int)Xapian::QueryParser::STEM_NONE);
SWIG_LONG_CONSTANT(QueryParser_STEM_SOME, (int)Xapian::QueryParser::STEM_SOME);
SWIG_LONG_CONSTANT(QueryParser_STEM_ALL, (int)Xapian::QueryParser::STEM_ALL);
SWIG_LONG_CONSTANT(QueryParser_STEM_ALL_Z, (int)Xapian::QueryParser::STEM_ALL_Z);
SWIG_LONG_CONSTANT(QueryParser_STEM_SOME_FULL_POS, (int)Xapian::QueryParser::STEM_SOME_FULL_POS);
SWIG_LONG_CONSTANT(Weight_TWO_STAGE_SMOOTHING, (int)Xapian::Weight::TWO_STAGE_SMOOTHING);
SWIG_LONG_CONSTANT(Weight_DIRICHLET_SMOOTHING, (int)Xapian::Weight::DIRICHLET_SMOOTHING);
SWIG_LONG_CONSTANT(Weight_ABSOLUTE_DISCOUNT_SMOOTHING, (int)Xapian::Weight::ABSOLUTE_DISCOUNT_SMOOTHING);
SWIG_LONG_CONSTANT(Weight_JELINEK_MERCER_SMOOTHING, (int)Xapian::Weight::JELINEK_MERCER_SMOOTHING);
SWIG_LONG_CONSTANT(Weight_DIRICHLET_PLUS_SMOOTHING, (int)Xapian::Weight::DIRICHLET_PLUS_SMOOTHING);
SWIG_LONG_CONSTANT(Compactor_STANDARD, (int)Xapian::Compactor::STANDARD);
SWIG_LONG_CONSTANT(Compactor_FULL, (int)Xapian::Compactor::FULL);
SWIG_LONG_CONSTANT(Compactor_FULLER, (int)Xapian::Compactor::FULLER);
/* end cinit subsection */

    return SUCCESS;
}

PHP_RINIT_FUNCTION(xapian)
{
/* rinit section */

/* vinit subsection */
/* end vinit subsection */

    return SUCCESS;
}

PHP_MSHUTDOWN_FUNCTION(xapian)
{
/* shutdown section */
#ifdef ZTS
    ts_free_id(xapian_globals_id);
#endif
    return SUCCESS;
}

PHP_RSHUTDOWN_FUNCTION(xapian)
{
/* rshutdown section */

    return SUCCESS;
}

PHP_MINFO_FUNCTION(xapian)
{
    php_info_print_table_start();
    php_info_print_table_row(2, "Xapian Support", "enabled");
    php_info_print_table_row(2, "Xapian Compiled Version",
			     XAPIAN_BINDINGS_VERSION);
    php_info_print_table_row(2, "Xapian Linked Version",
			     Xapian::version_string());
    php_info_print_table_end();
}
/* end init section */
