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

#include <string>



#define SWIG_VERSION 0x040300
#define SWIGPHP
#define SWIG_DIRECTORS

#if defined __GNUC__ && !defined __cplusplus
# if __GNUC__ >= 4
#  pragma GCC diagnostic push
#  pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
# endif
#endif
#include "php.h"
#if defined __GNUC__ && !defined __cplusplus
# if __GNUC__ >= 4
#  pragma GCC diagnostic pop
# endif
#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

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

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

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

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

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

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

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.

  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

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

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2
#define SWIG_POINTER_NO_NULL       0x4
#define SWIG_POINTER_CLEAR         0x8
#define SWIG_POINTER_RELEASE       (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)

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


/*
   Flags/methods for returning states.

   The SWIG conversion methods, as ConvertPtr, return an integer
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).

   Use the following macros/flags to set or process the returning
   states.

   In old versions of SWIG, code such as the following was usually written:

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

   Now you can be more explicit:

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

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

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }

   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

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

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

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

       int food(double)
       int fooi(int);

   and you call

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

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

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

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

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

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


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  Choose the last
     name. It should be the most specific; a fully resolved name
     but not necessarily with default template parameters expanded. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/*
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;

  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }
    cast = cast->next;
  }
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}

/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start,
                            swig_module_info *end,
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      size_t l = 0;
      size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	size_t i = (l + r) >> 1;
	const char *iname = iter->types[i]->name;
	if (iname) {
	  int compare = strcmp(name, iname);
	  if (compare == 0) {
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

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

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

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

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

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

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

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

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

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

#ifdef __cplusplus
}
#endif

/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13


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

#define swig_owntype                                    int

#ifdef __cplusplus
extern "C" {
#endif

#if PHP_MAJOR_VERSION < 8
# error These bindings need PHP 8 or later - to generate PHP7 bindings use SWIG < 4.1.0; to generate PHP5 bindings use: SWIG < 4.0.0 and swig -php5
#endif

#include "zend_inheritance.h"
#include "zend_exceptions.h"
#include "zend_inheritance.h"

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

#define SWIG_BOOL_CONSTANT(N, V) REGISTER_BOOL_CONSTANT(#N, V, CONST_CS | CONST_PERSISTENT)
#define SWIG_LONG_CONSTANT(N, V) REGISTER_LONG_CONSTANT(#N, V, CONST_CS | CONST_PERSISTENT)
#define SWIG_DOUBLE_CONSTANT(N, V) REGISTER_DOUBLE_CONSTANT(#N, V, CONST_CS | CONST_PERSISTENT)
#define SWIG_STRING_CONSTANT(N, V) REGISTER_STRING_CONSTANT(#N, (char*)V, CONST_CS | CONST_PERSISTENT)
#define SWIG_CHAR_CONSTANT(N, V) do {\
    char swig_char = (V);\
    REGISTER_STRINGL_CONSTANT(#N, &swig_char, 1, CONST_CS | CONST_PERSISTENT);\
} while (0)

#ifdef __cplusplus
}
#endif

#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 { zend_throw_exception(NULL, msg, code); SWIG_fail; } while (0)

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

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

static zend_class_entry SWIG_Php_swig_wrapped_interface_ce;

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

#define SWIG_Z_FETCH_OBJ_P(zv) swig_php_fetch_object(Z_OBJ_P(zv))

static inline
swig_object_wrapper * swig_php_fetch_object(zend_object *obj) {
  return (swig_object_wrapper *)((char *)obj - XtOffsetOf(swig_object_wrapper, std));
}

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

static void
SWIG_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject) {
  // Return PHP NULL for a C/C++ NULL pointer.
  if (!ptr) {
    ZVAL_NULL(z);
    return;
  }

  if (!type->clientdata) {
    zend_type_error("Type: %s not registered with zend", type->name);
    return;
  }

  {
    zend_object *obj;
    swig_object_wrapper *value;
    if (Z_TYPE_P(z) == IS_OBJECT) {
      /* The PHP object is already initialised - this is the case when wrapping
       * the return value from a PHP constructor. */
      obj = Z_OBJ_P(z);
    } else {
      zend_class_entry *ce = (zend_class_entry*)(type->clientdata);
      obj = ce->create_object(ce);
      ZVAL_OBJ(z, obj);
    }
    value = swig_php_fetch_object(obj);
    value->ptr = ptr;
    value->newobject = (newobject & 1);
    value->type = type;
  }
}

/* We wrap C/C++ pointers as PHP objects. */
static int
SWIG_ConvertPtrAndOwn(zval *z, void **ptr, swig_type_info *ty, int flags, swig_owntype *own) {
  if (own)
    *own = 0;

  if (z == NULL) {
    *ptr = 0;
    return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
  }

  switch (Z_TYPE_P(z)) {
    case IS_OBJECT: {
      zend_object *obj = Z_OBJ_P(z);
      swig_object_wrapper *value;
      if (ty && ty->clientdata == (void*)obj->ce) {
	// Object is exactly the class asked for - this handles common cases cheaply,
	// and in particular the PHP classes we use to wrap a pointer to a non-class.
      } else if (!zend_class_implements_interface(obj->ce, &SWIG_Php_swig_wrapped_interface_ce)) {
	// Not an object we've wrapped.
	return -1;
      }

      /* convert and cast value->ptr from value->type to ptr as ty. */
      value = swig_php_fetch_object(obj);
      if (!ty) {
	/* They don't care about the target type, so just pass on the pointer! */
	*ptr = value->ptr;
      } else {
	swig_cast_info *tc = SWIG_TypeCheck(value->type->name, ty);
	if (tc) {
	  int newmemory = 0;
	  *ptr = SWIG_TypeCast(tc, value->ptr, &newmemory);
	  if (newmemory == SWIG_CAST_NEW_MEMORY) {
	    assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
	    if (own)
	      *own |= SWIG_CAST_NEW_MEMORY;
	  }
	} else {
	  *ptr = NULL;
	}
      }

      if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !value->newobject) {
        return SWIG_ERROR_RELEASE_NOT_OWNED;
      } else {
        if (*ptr == NULL)
          return SWIG_ERROR; /* should be SWIG_NullReferenceError?? */
        if (flags & SWIG_POINTER_DISOWN) {
          value->newobject = 0;
        }
        if (flags & SWIG_POINTER_CLEAR) {
          value->ptr = 0;
        }
      }

      return SWIG_OK;
    }
    case IS_NULL:
      *ptr = 0;
      return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
  }

  return -1;
}

static int
SWIG_ConvertPtr(zval *z, void **ptr, swig_type_info *ty, int flags) {
  return SWIG_ConvertPtrAndOwn(z, ptr, ty, flags, 0);
}

static const char const_name[] = "swig_runtime_data_type_pointer";
static swig_module_info *SWIG_Php_GetModule(void) {
  zval *pointer = zend_get_constant_str(const_name, sizeof(const_name) - 1);
  if (pointer) {
    if (Z_TYPE_P(pointer) == IS_LONG) {
      return (swig_module_info *) pointer->value.lval;
    }
  }
  return NULL;
}

static void SWIG_Php_SetModule(swig_module_info *pointer, int module_number) {
  REGISTER_LONG_CONSTANT(const_name, (long) pointer, CONST_CS | CONST_PERSISTENT);
}

/* Common parts of the "create_object" object handler. */
static zend_object *SWIG_Php_do_create_object(zend_class_entry *ce, zend_object_handlers *handlers) {
  swig_object_wrapper *obj = (swig_object_wrapper*)zend_object_alloc(sizeof(swig_object_wrapper), ce);
  zend_object_std_init(&obj->std, ce);
  object_properties_init(&obj->std, ce);
  obj->std.handlers = handlers;
  obj->newobject = 1;
  return &obj->std;
}

/* Common parts of the "free_obj" object handler.
   Returns void* pointer if the C/C++ object should be destroyed. */
static void* SWIG_Php_free_obj(zend_object *object) {
  if (object) {
    swig_object_wrapper *obj = swig_php_fetch_object(object);
    zend_object_std_dtor(&obj->std);
    if (obj->newobject) return obj->ptr;
  }
  return NULL;
}

/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13



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

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

#define SWIG_DIRECTOR_CAST(ARG) dynamic_cast<Swig::Director *>(ARG)

#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 {
    private:
      /* flag indicating whether the object is owned by PHP or C++ */
      mutable bool swig_disown_flag;

    protected:
      // "mutable" so we can get a non-const pointer to it in const methods.
      mutable zval swig_self;
      typedef std::map<void *, GCItem_var> swig_ownership_map;
      mutable swig_ownership_map swig_owner;

    public:
      Director(zval *self) : swig_disown_flag(false) {
        ZVAL_COPY_VALUE(&swig_self, self);
      }

      ~Director() {
        if (swig_disown_flag) {
          Z_DELREF(swig_self);
	}
      }

      zend_object *swig_get_self() const { return Z_OBJ(swig_self); }

      void swig_disown() const {
        if (!swig_disown_flag) {
          swig_disown_flag = true;
          Z_ADDREF(swig_self);
        }
      }

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

      void swig_acquire_ownership_obj(void *vptr, int own) const {
        if (vptr && own) {
          swig_owner[vptr] = new GCItem_Object(own);
        }
      }
  };

  /* 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) : swig_msg(hdr) {
      if (msg && msg[0]) {
        swig_msg += " ";
        swig_msg += msg;
      }
      // Don't replace an already active PHP exception.
      if (!EG(exception)) zend_throw_exception(NULL, swig_msg.c_str(), code);
    }

    virtual ~DirectorException() throw() {
    }

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

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

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

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

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

    DirectorMethodException(const char *msg)
      : DirectorException(E_ERROR, "SWIG director method error", msg) {
    }

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

#endif

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

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

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

#endif



#define SWIG_PHP_INTERFACE_Iterator_CE zend_ce_iterator
#define SWIG_PHP_INTERFACE_Iterator_HEADER "zend_interfaces.h"

#define SWIG_PHP_INTERFACE_IteratorAggregate_CE zend_ce_aggregate
#define SWIG_PHP_INTERFACE_IteratorAggregate_HEADER "zend_interfaces.h"

#define SWIG_PHP_INTERFACE_ArrayAccess_CE zend_ce_arrayaccess
#define SWIG_PHP_INTERFACE_ArrayAccess_HEADER "zend_interfaces.h"

#define SWIG_PHP_INTERFACE_Serializable_CE zend_ce_serializable
#define SWIG_PHP_INTERFACE_Serializable_HEADER "zend_interfaces.h"

#define SWIG_PHP_INTERFACE_Countable_CE zend_ce_countable
#define SWIG_PHP_INTERFACE_Countable_HEADER "zend_interfaces.h"

#define SWIG_PHP_INTERFACE_OuterIterator_CE spl_ce_OuterIterator
#define SWIG_PHP_INTERFACE_OuterIterator_HEADER "ext/spl/spl_iterators.h"

#define SWIG_PHP_INTERFACE_RecursiveIterator_CE spl_ce_RecursiveIterator
#define SWIG_PHP_INTERFACE_RecursiveIterator_HEADER "ext/spl/spl_iterators.h"

#define SWIG_PHP_INTERFACE_SeekableIterator_CE spl_ce_SeekableIterator
#define SWIG_PHP_INTERFACE_SeekableIterator_HEADER "ext/spl/spl_iterators.h"

#define SWIG_PHP_INTERFACE_SplObserver_CE spl_ce_SplObserver
#define SWIG_PHP_INTERFACE_SplObserver_HEADER "ext/spl/spl_observer.h"

#define SWIG_PHP_INTERFACE_SplSubject_CE spl_ce_SplSubject
#define SWIG_PHP_INTERFACE_SplSubject_HEADER "ext/spl/spl_observer.h"

#define SWIG_PHP_INTERFACE_DateTimeInterface_CE php_date_get_interface_ce()
#define SWIG_PHP_INTERFACE_DateTimeInterface_HEADER "ext/date/php_date.h"

// The "json" extension needs to be loaded earlier that us for this to work.
#define SWIG_PHP_INTERFACE_JsonSerializable_CE php_json_serializable_ce
#define SWIG_PHP_INTERFACE_JsonSerializable_HEADER "ext/json/php_json.h"

// New in PHP 8.0.
#define SWIG_PHP_INTERFACE_Stringable_CE zend_ce_stringable
#define SWIG_PHP_INTERFACE_Stringable_HEADER "zend_interfaces.h"



/* php.i: SWIG interface file for the PHP bindings
 *
 * Copyright (C) 2004-2022 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, see
 * <https://www.gnu.org/licenses/>.
 */

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


extern "C" {
// Needed for php_array_merge().
#include <ext/standard/php_array.h>
}


/** @file
 * @brief Header for SWIG interface file for Xapian.
 */
/* Copyright (C) 2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016 Olly Betts
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see
 * <https://www.gnu.org/licenses/>.
 */

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

}


#define SWIG_exception(code, msg) do { zend_throw_exception( \
    code == SWIG_TypeError ? zend_ce_type_error : \
    code == SWIG_ValueError ? zend_ce_value_error : \
    code == SWIG_DivisionByZero ? zend_ce_division_by_zero_error : \
    code == SWIG_SyntaxError ? zend_ce_parse_error : \
    code == SWIG_OverflowError ? zend_ce_arithmetic_error : \
    NULL, msg, code); SWIG_fail; } while (0)


#include <typeinfo>
#include <stdexcept>


#include <typeinfo>
#include <stdexcept>


#include <string>


#include <vector>
#include <stdexcept>


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


#include <utility>


/** Merge _ps properties.
 *
 *  We use these to keep references to XapianPostingSource objects used in
 *  XapianQuery objects.
 */
static void merge_ps_references(zval* target_this, zval& input) {
    zval* zvq = zend_read_property(Z_OBJCE(input), Z_OBJ(input), "_ps", strlen("_ps"), false, NULL);
    if (zend_hash_num_elements(Z_ARR_P(zvq)) > 0) {
	zval* zv = zend_read_property(Z_OBJCE_P(target_this), Z_OBJ_P(target_this), "_ps", strlen("_ps"), false, NULL);
	if (zend_hash_num_elements(Z_ARR_P(zv)) == 0) {
	    ZVAL_COPY(zv, zvq);
	} else {
	    SEPARATE_ARRAY(zv);
	    php_array_merge(Z_ARR_P(zv), Z_ARR_P(zvq));
	}
    }
}

class XapianSWIGQueryItor {
#if PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION < 2
    Bucket* p;
#else
    zval* p;
    size_t elt_size;
#endif

    zval* target_this;

  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()
	: p(NULL) { }

    void begin(zval* input, zval* target_this_) {
	HashTable *ht = Z_ARRVAL_P(input);
#if PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION < 2
	p = ht->arData;
#else
	elt_size = ZEND_HASH_ELEMENT_SIZE(ht);
	p = ZEND_HASH_ELEMENT(ht, 0);
#endif
	target_this = target_this_;
    }

    void end(zval * input) {
	HashTable *ht = Z_ARRVAL_P(input);
#if PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION < 2
	p = ht->arData + ht->nNumUsed;
#else
	elt_size = ZEND_HASH_ELEMENT_SIZE(ht);
	p = ZEND_HASH_ELEMENT(ht, ht->nNumUsed);
#endif
    }

    XapianSWIGQueryItor & operator++() {
#if PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION < 2
	++p;
#else
	p = ZEND_HASH_NEXT_ELEMENT(p, elt_size);
#endif
	return *this;
    }

    Xapian::Query operator*() const {
#if PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION < 2
	zval *item = &p->val;
#else
	zval *item = p;
#endif

	if (Z_TYPE_P(item) == IS_STRING) {
	    size_t len = Z_STRLEN_P(item);
	    const char *str = Z_STRVAL_P(item);
	    return Xapian::Query(string(str, len));
	}

	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();
	}
	merge_ps_references(target_this, *item);
	return *subq;
    }

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

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

    difference_type operator-(const XapianSWIGQueryItor &o) const {
#if PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION < 2
	return p - o.p;
#else
	auto d = reinterpret_cast<const char*>(p) -
		 reinterpret_cast<const char*>(o.p);
	return d / elt_size;
#endif
    }
};



#include <xapian/iterator.h>


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

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

static void
XapianExceptionHandler()
{
    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.
	zend_throw_exception(NULL, e.get_description().c_str(),
			     SWIG_UnknownError);
    } catch (const std::exception &e) {
	zend_throw_exception_ex(NULL, SWIG_UnknownError,
				"std::exception %s", e.what());
    } catch (...) {
	zend_throw_exception(NULL, "unknown error in Xapian",
			     SWIG_UnknownError);
    }
}


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

#ifdef __cplusplus
extern "C" {
#endif
#ifdef SWIG_PHP_INTERFACE_Iterator_HEADER
# include SWIG_PHP_INTERFACE_Iterator_HEADER
#endif
#ifdef __cplusplus
}
#endif
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); }
#ifdef __cplusplus
extern "C" {
#endif
#ifdef SWIG_PHP_INTERFACE_Iterator_HEADER
# include SWIG_PHP_INTERFACE_Iterator_HEADER
#endif
#ifdef __cplusplus
}
#endif
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); }
#ifdef __cplusplus
extern "C" {
#endif
#ifdef SWIG_PHP_INTERFACE_Iterator_HEADER
# include SWIG_PHP_INTERFACE_Iterator_HEADER
#endif
#ifdef __cplusplus
}
#endif
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); }
#ifdef __cplusplus
extern "C" {
#endif
#ifdef SWIG_PHP_INTERFACE_Iterator_HEADER
# include SWIG_PHP_INTERFACE_Iterator_HEADER
#endif
#ifdef __cplusplus
}
#endif
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]);
    }
#ifdef __cplusplus
extern "C" {
#endif
#ifdef SWIG_PHP_INTERFACE_Iterator_HEADER
# include SWIG_PHP_INTERFACE_Iterator_HEADER
#endif
#ifdef __cplusplus
}
#endif
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); }
#ifdef __cplusplus
extern "C" {
#endif
#ifdef SWIG_PHP_INTERFACE_Iterator_HEADER
# include SWIG_PHP_INTERFACE_Iterator_HEADER
#endif
#ifdef __cplusplus
}
#endif
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_1(std::string const &file){
	ifstream in_file(file.c_str());
	if (!in_file.is_open())
	    throw Xapian::InvalidArgumentError("Stopword file not found: " + file);
	istream_iterator<std::string> in_iter(in_file);
	istream_iterator<std::string> eof;
	return new Xapian::SimpleStopper(in_iter, eof);
    }
SWIGINTERN bool Xapian_LatLongCoordsIterator_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; }
}

static zend_class_entry *SWIG_Php_ce_Xapian;

static zend_object_handlers Swig_Php_base_object_handlers;

static zend_class_entry *SWIG_Php_ce_PositionIterator;

static zend_object_handlers PositionIterator_object_handlers;
static zend_object *SWIG_Php_create_object_PositionIterator(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &PositionIterator_object_handlers);}
static void SWIG_Php_free_obj_PositionIterator(zend_object *object) {delete (Xapian::PositionIterator *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_PostingIterator;

static zend_object_handlers PostingIterator_object_handlers;
static zend_object *SWIG_Php_create_object_PostingIterator(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &PostingIterator_object_handlers);}
static void SWIG_Php_free_obj_PostingIterator(zend_object *object) {delete (Xapian::PostingIterator *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_TermIterator;

static zend_object_handlers TermIterator_object_handlers;
static zend_object *SWIG_Php_create_object_TermIterator(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &TermIterator_object_handlers);}
static void SWIG_Php_free_obj_TermIterator(zend_object *object) {delete (Xapian::TermIterator *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ValueIterator;

static zend_object_handlers ValueIterator_object_handlers;
static zend_object *SWIG_Php_create_object_ValueIterator(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ValueIterator_object_handlers);}
static void SWIG_Php_free_obj_ValueIterator(zend_object *object) {delete (Xapian::ValueIterator *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_Document;

static zend_object_handlers Document_object_handlers;
static zend_object *SWIG_Php_create_object_Document(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &Document_object_handlers);}
static void SWIG_Php_free_obj_Document(zend_object *object) {delete (Xapian::Document *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_Registry;

static zend_object_handlers Registry_object_handlers;
static zend_object *SWIG_Php_create_object_Registry(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &Registry_object_handlers);}
static void SWIG_Php_free_obj_Registry(zend_object *object) {delete (Xapian::Registry *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_Query;

static zend_object_handlers Query_object_handlers;
static zend_object *SWIG_Php_create_object_Query(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &Query_object_handlers);}
static void SWIG_Php_free_obj_Query(zend_object *object) {delete (Xapian::Query *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_StemImplementation;

static zend_object_handlers StemImplementation_object_handlers;
static zend_object *SWIG_Php_create_object_StemImplementation(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &StemImplementation_object_handlers);}
static void SWIG_Php_free_obj_StemImplementation(zend_object *object) {delete (Xapian::StemImplementation *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_Stem;

static zend_object_handlers Stem_object_handlers;
static zend_object *SWIG_Php_create_object_Stem(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &Stem_object_handlers);}
static void SWIG_Php_free_obj_Stem(zend_object *object) {delete (Xapian::Stem *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_TermGenerator;

static zend_object_handlers TermGenerator_object_handlers;
static zend_object *SWIG_Php_create_object_TermGenerator(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &TermGenerator_object_handlers);}
static void SWIG_Php_free_obj_TermGenerator(zend_object *object) {delete (Xapian::TermGenerator *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_MSet;

static zend_object_handlers MSet_object_handlers;
static zend_object *SWIG_Php_create_object_MSet(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &MSet_object_handlers);}
static void SWIG_Php_free_obj_MSet(zend_object *object) {delete (Xapian::MSet *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_MSetIterator;

static zend_object_handlers MSetIterator_object_handlers;
static zend_object *SWIG_Php_create_object_MSetIterator(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &MSetIterator_object_handlers);}
static void SWIG_Php_free_obj_MSetIterator(zend_object *object) {delete (Xapian::MSetIterator *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ESet;

static zend_object_handlers ESet_object_handlers;
static zend_object *SWIG_Php_create_object_ESet(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ESet_object_handlers);}
static void SWIG_Php_free_obj_ESet(zend_object *object) {delete (Xapian::ESet *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ESetIterator;

static zend_object_handlers ESetIterator_object_handlers;
static zend_object *SWIG_Php_create_object_ESetIterator(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ESetIterator_object_handlers);}
static void SWIG_Php_free_obj_ESetIterator(zend_object *object) {delete (Xapian::ESetIterator *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_RSet;

static zend_object_handlers RSet_object_handlers;
static zend_object *SWIG_Php_create_object_RSet(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &RSet_object_handlers);}
static void SWIG_Php_free_obj_RSet(zend_object *object) {delete (Xapian::RSet *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_MatchDecider;

static zend_object_handlers MatchDecider_object_handlers;
static zend_object *SWIG_Php_create_object_MatchDecider(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &MatchDecider_object_handlers);}
static void SWIG_Php_free_obj_MatchDecider(zend_object *object) {delete (Xapian::MatchDecider *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_Enquire;

static zend_object_handlers Enquire_object_handlers;
static zend_object *SWIG_Php_create_object_Enquire(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &Enquire_object_handlers);}
static void SWIG_Php_free_obj_Enquire(zend_object *object) {delete (Xapian::Enquire *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ExpandDecider;

static zend_object_handlers ExpandDecider_object_handlers;
static zend_object *SWIG_Php_create_object_ExpandDecider(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ExpandDecider_object_handlers);}
static void SWIG_Php_free_obj_ExpandDecider(zend_object *object) {delete (Xapian::ExpandDecider *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ExpandDeciderAnd;

static zend_object_handlers ExpandDeciderAnd_object_handlers;
static zend_object *SWIG_Php_create_object_ExpandDeciderAnd(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ExpandDeciderAnd_object_handlers);}
static void SWIG_Php_free_obj_ExpandDeciderAnd(zend_object *object) {delete (Xapian::ExpandDeciderAnd *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ExpandDeciderFilterPrefix;

static zend_object_handlers ExpandDeciderFilterPrefix_object_handlers;
static zend_object *SWIG_Php_create_object_ExpandDeciderFilterPrefix(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ExpandDeciderFilterPrefix_object_handlers);}
static void SWIG_Php_free_obj_ExpandDeciderFilterPrefix(zend_object *object) {delete (Xapian::ExpandDeciderFilterPrefix *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_KeyMaker;

static zend_object_handlers KeyMaker_object_handlers;
static zend_object *SWIG_Php_create_object_KeyMaker(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &KeyMaker_object_handlers);}
static void SWIG_Php_free_obj_KeyMaker(zend_object *object) {delete (Xapian::KeyMaker *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_MultiValueKeyMaker;

static zend_object_handlers MultiValueKeyMaker_object_handlers;
static zend_object *SWIG_Php_create_object_MultiValueKeyMaker(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &MultiValueKeyMaker_object_handlers);}
static void SWIG_Php_free_obj_MultiValueKeyMaker(zend_object *object) {delete (Xapian::MultiValueKeyMaker *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_Stopper;

static zend_object_handlers Stopper_object_handlers;
static zend_object *SWIG_Php_create_object_Stopper(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &Stopper_object_handlers);}
static void SWIG_Php_free_obj_Stopper(zend_object *object) {delete (Xapian::Stopper *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_SimpleStopper;

static zend_object_handlers SimpleStopper_object_handlers;
static zend_object *SWIG_Php_create_object_SimpleStopper(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &SimpleStopper_object_handlers);}
static void SWIG_Php_free_obj_SimpleStopper(zend_object *object) {delete (Xapian::SimpleStopper *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_RangeProcessor;

static zend_object_handlers RangeProcessor_object_handlers;
static zend_object *SWIG_Php_create_object_RangeProcessor(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &RangeProcessor_object_handlers);}
static void SWIG_Php_free_obj_RangeProcessor(zend_object *object) {delete (Xapian::RangeProcessor *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_DateRangeProcessor;

static zend_object_handlers DateRangeProcessor_object_handlers;
static zend_object *SWIG_Php_create_object_DateRangeProcessor(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &DateRangeProcessor_object_handlers);}
static void SWIG_Php_free_obj_DateRangeProcessor(zend_object *object) {delete (Xapian::DateRangeProcessor *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_NumberRangeProcessor;

static zend_object_handlers NumberRangeProcessor_object_handlers;
static zend_object *SWIG_Php_create_object_NumberRangeProcessor(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &NumberRangeProcessor_object_handlers);}
static void SWIG_Php_free_obj_NumberRangeProcessor(zend_object *object) {delete (Xapian::NumberRangeProcessor *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ValueRangeProcessor;

static zend_object_handlers ValueRangeProcessor_object_handlers;
static zend_object *SWIG_Php_create_object_ValueRangeProcessor(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ValueRangeProcessor_object_handlers);}
static void SWIG_Php_free_obj_ValueRangeProcessor(zend_object *object) {delete (Xapian::ValueRangeProcessor *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_StringValueRangeProcessor;

static zend_object_handlers StringValueRangeProcessor_object_handlers;
static zend_object *SWIG_Php_create_object_StringValueRangeProcessor(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &StringValueRangeProcessor_object_handlers);}
static void SWIG_Php_free_obj_StringValueRangeProcessor(zend_object *object) {delete (Xapian::StringValueRangeProcessor *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_DateValueRangeProcessor;

static zend_object_handlers DateValueRangeProcessor_object_handlers;
static zend_object *SWIG_Php_create_object_DateValueRangeProcessor(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &DateValueRangeProcessor_object_handlers);}
static void SWIG_Php_free_obj_DateValueRangeProcessor(zend_object *object) {delete (Xapian::DateValueRangeProcessor *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_NumberValueRangeProcessor;

static zend_object_handlers NumberValueRangeProcessor_object_handlers;
static zend_object *SWIG_Php_create_object_NumberValueRangeProcessor(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &NumberValueRangeProcessor_object_handlers);}
static void SWIG_Php_free_obj_NumberValueRangeProcessor(zend_object *object) {delete (Xapian::NumberValueRangeProcessor *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_FieldProcessor;

static zend_object_handlers FieldProcessor_object_handlers;
static zend_object *SWIG_Php_create_object_FieldProcessor(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &FieldProcessor_object_handlers);}
static void SWIG_Php_free_obj_FieldProcessor(zend_object *object) {delete (Xapian::FieldProcessor *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_QueryParser;

static zend_object_handlers QueryParser_object_handlers;
static zend_object *SWIG_Php_create_object_QueryParser(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &QueryParser_object_handlers);}
static void SWIG_Php_free_obj_QueryParser(zend_object *object) {delete (Xapian::QueryParser *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ValueSetMatchDecider;

static zend_object_handlers ValueSetMatchDecider_object_handlers;
static zend_object *SWIG_Php_create_object_ValueSetMatchDecider(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ValueSetMatchDecider_object_handlers);}
static void SWIG_Php_free_obj_ValueSetMatchDecider(zend_object *object) {delete (Xapian::ValueSetMatchDecider *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_Weight;

static zend_object_handlers Weight_object_handlers;
static zend_object *SWIG_Php_create_object_Weight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &Weight_object_handlers);}
static void SWIG_Php_free_obj_Weight(zend_object *object) {delete (Xapian::Weight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_BoolWeight;

static zend_object_handlers BoolWeight_object_handlers;
static zend_object *SWIG_Php_create_object_BoolWeight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &BoolWeight_object_handlers);}
static void SWIG_Php_free_obj_BoolWeight(zend_object *object) {delete (Xapian::BoolWeight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_TfIdfWeight;

static zend_object_handlers TfIdfWeight_object_handlers;
static zend_object *SWIG_Php_create_object_TfIdfWeight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &TfIdfWeight_object_handlers);}
static void SWIG_Php_free_obj_TfIdfWeight(zend_object *object) {delete (Xapian::TfIdfWeight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_BM25Weight;

static zend_object_handlers BM25Weight_object_handlers;
static zend_object *SWIG_Php_create_object_BM25Weight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &BM25Weight_object_handlers);}
static void SWIG_Php_free_obj_BM25Weight(zend_object *object) {delete (Xapian::BM25Weight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_BM25PlusWeight;

static zend_object_handlers BM25PlusWeight_object_handlers;
static zend_object *SWIG_Php_create_object_BM25PlusWeight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &BM25PlusWeight_object_handlers);}
static void SWIG_Php_free_obj_BM25PlusWeight(zend_object *object) {delete (Xapian::BM25PlusWeight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_TradWeight;

static zend_object_handlers TradWeight_object_handlers;
static zend_object *SWIG_Php_create_object_TradWeight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &TradWeight_object_handlers);}
static void SWIG_Php_free_obj_TradWeight(zend_object *object) {delete (Xapian::TradWeight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_InL2Weight;

static zend_object_handlers InL2Weight_object_handlers;
static zend_object *SWIG_Php_create_object_InL2Weight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &InL2Weight_object_handlers);}
static void SWIG_Php_free_obj_InL2Weight(zend_object *object) {delete (Xapian::InL2Weight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_IfB2Weight;

static zend_object_handlers IfB2Weight_object_handlers;
static zend_object *SWIG_Php_create_object_IfB2Weight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &IfB2Weight_object_handlers);}
static void SWIG_Php_free_obj_IfB2Weight(zend_object *object) {delete (Xapian::IfB2Weight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_IneB2Weight;

static zend_object_handlers IneB2Weight_object_handlers;
static zend_object *SWIG_Php_create_object_IneB2Weight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &IneB2Weight_object_handlers);}
static void SWIG_Php_free_obj_IneB2Weight(zend_object *object) {delete (Xapian::IneB2Weight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_BB2Weight;

static zend_object_handlers BB2Weight_object_handlers;
static zend_object *SWIG_Php_create_object_BB2Weight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &BB2Weight_object_handlers);}
static void SWIG_Php_free_obj_BB2Weight(zend_object *object) {delete (Xapian::BB2Weight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_DLHWeight;

static zend_object_handlers DLHWeight_object_handlers;
static zend_object *SWIG_Php_create_object_DLHWeight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &DLHWeight_object_handlers);}
static void SWIG_Php_free_obj_DLHWeight(zend_object *object) {delete (Xapian::DLHWeight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_PL2Weight;

static zend_object_handlers PL2Weight_object_handlers;
static zend_object *SWIG_Php_create_object_PL2Weight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &PL2Weight_object_handlers);}
static void SWIG_Php_free_obj_PL2Weight(zend_object *object) {delete (Xapian::PL2Weight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_PL2PlusWeight;

static zend_object_handlers PL2PlusWeight_object_handlers;
static zend_object *SWIG_Php_create_object_PL2PlusWeight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &PL2PlusWeight_object_handlers);}
static void SWIG_Php_free_obj_PL2PlusWeight(zend_object *object) {delete (Xapian::PL2PlusWeight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_DPHWeight;

static zend_object_handlers DPHWeight_object_handlers;
static zend_object *SWIG_Php_create_object_DPHWeight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &DPHWeight_object_handlers);}
static void SWIG_Php_free_obj_DPHWeight(zend_object *object) {delete (Xapian::DPHWeight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_LMWeight;

static zend_object_handlers LMWeight_object_handlers;
static zend_object *SWIG_Php_create_object_LMWeight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &LMWeight_object_handlers);}
static void SWIG_Php_free_obj_LMWeight(zend_object *object) {delete (Xapian::LMWeight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_CoordWeight;

static zend_object_handlers CoordWeight_object_handlers;
static zend_object *SWIG_Php_create_object_CoordWeight(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &CoordWeight_object_handlers);}
static void SWIG_Php_free_obj_CoordWeight(zend_object *object) {delete (Xapian::CoordWeight *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_Compactor;

static zend_object_handlers Compactor_object_handlers;
static zend_object *SWIG_Php_create_object_Compactor(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &Compactor_object_handlers);}
static void SWIG_Php_free_obj_Compactor(zend_object *object) {delete (Xapian::Compactor *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_PostingSource;

static zend_object_handlers PostingSource_object_handlers;
static zend_object *SWIG_Php_create_object_PostingSource(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &PostingSource_object_handlers);}
static void SWIG_Php_free_obj_PostingSource(zend_object *object) {delete (Xapian::PostingSource *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ValuePostingSource;

static zend_object_handlers ValuePostingSource_object_handlers;
static zend_object *SWIG_Php_create_object_ValuePostingSource(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ValuePostingSource_object_handlers);}
static void SWIG_Php_free_obj_ValuePostingSource(zend_object *object) {delete (Xapian::ValuePostingSource *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ValueWeightPostingSource;

static zend_object_handlers ValueWeightPostingSource_object_handlers;
static zend_object *SWIG_Php_create_object_ValueWeightPostingSource(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ValueWeightPostingSource_object_handlers);}
static void SWIG_Php_free_obj_ValueWeightPostingSource(zend_object *object) {delete (Xapian::ValueWeightPostingSource *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_DecreasingValueWeightPostingSource;

static zend_object_handlers DecreasingValueWeightPostingSource_object_handlers;
static zend_object *SWIG_Php_create_object_DecreasingValueWeightPostingSource(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &DecreasingValueWeightPostingSource_object_handlers);}
static void SWIG_Php_free_obj_DecreasingValueWeightPostingSource(zend_object *object) {delete (Xapian::DecreasingValueWeightPostingSource *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ValueMapPostingSource;

static zend_object_handlers ValueMapPostingSource_object_handlers;
static zend_object *SWIG_Php_create_object_ValueMapPostingSource(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ValueMapPostingSource_object_handlers);}
static void SWIG_Php_free_obj_ValueMapPostingSource(zend_object *object) {delete (Xapian::ValueMapPostingSource *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_FixedWeightPostingSource;

static zend_object_handlers FixedWeightPostingSource_object_handlers;
static zend_object *SWIG_Php_create_object_FixedWeightPostingSource(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &FixedWeightPostingSource_object_handlers);}
static void SWIG_Php_free_obj_FixedWeightPostingSource(zend_object *object) {delete (Xapian::FixedWeightPostingSource *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_MatchSpy;

static zend_object_handlers MatchSpy_object_handlers;
static zend_object *SWIG_Php_create_object_MatchSpy(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &MatchSpy_object_handlers);}
static void SWIG_Php_free_obj_MatchSpy(zend_object *object) {delete (Xapian::MatchSpy *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_ValueCountMatchSpy;

static zend_object_handlers ValueCountMatchSpy_object_handlers;
static zend_object *SWIG_Php_create_object_ValueCountMatchSpy(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &ValueCountMatchSpy_object_handlers);}
static void SWIG_Php_free_obj_ValueCountMatchSpy(zend_object *object) {delete (Xapian::ValueCountMatchSpy *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_LatLongCoord;

static zend_object_handlers LatLongCoord_object_handlers;
static zend_object *SWIG_Php_create_object_LatLongCoord(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &LatLongCoord_object_handlers);}
static void SWIG_Php_free_obj_LatLongCoord(zend_object *object) {delete (Xapian::LatLongCoord *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_LatLongCoordsIterator;

static zend_object_handlers LatLongCoordsIterator_object_handlers;
static zend_object *SWIG_Php_create_object_LatLongCoordsIterator(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &LatLongCoordsIterator_object_handlers);}
static void SWIG_Php_free_obj_LatLongCoordsIterator(zend_object *object) {delete (Xapian::LatLongCoordsIterator *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_LatLongCoords;

static zend_object_handlers LatLongCoords_object_handlers;
static zend_object *SWIG_Php_create_object_LatLongCoords(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &LatLongCoords_object_handlers);}
static void SWIG_Php_free_obj_LatLongCoords(zend_object *object) {delete (Xapian::LatLongCoords *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_LatLongMetric;

static zend_object_handlers LatLongMetric_object_handlers;
static zend_object *SWIG_Php_create_object_LatLongMetric(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &LatLongMetric_object_handlers);}
static void SWIG_Php_free_obj_LatLongMetric(zend_object *object) {delete (Xapian::LatLongMetric *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_GreatCircleMetric;

static zend_object_handlers GreatCircleMetric_object_handlers;
static zend_object *SWIG_Php_create_object_GreatCircleMetric(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &GreatCircleMetric_object_handlers);}
static void SWIG_Php_free_obj_GreatCircleMetric(zend_object *object) {delete (Xapian::GreatCircleMetric *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_LatLongDistancePostingSource;

static zend_object_handlers LatLongDistancePostingSource_object_handlers;
static zend_object *SWIG_Php_create_object_LatLongDistancePostingSource(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &LatLongDistancePostingSource_object_handlers);}
static void SWIG_Php_free_obj_LatLongDistancePostingSource(zend_object *object) {delete (Xapian::LatLongDistancePostingSource *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_LatLongDistanceKeyMaker;

static zend_object_handlers LatLongDistanceKeyMaker_object_handlers;
static zend_object *SWIG_Php_create_object_LatLongDistanceKeyMaker(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &LatLongDistanceKeyMaker_object_handlers);}
static void SWIG_Php_free_obj_LatLongDistanceKeyMaker(zend_object *object) {delete (Xapian::LatLongDistanceKeyMaker *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_Database;

static zend_object_handlers Database_object_handlers;
static zend_object *SWIG_Php_create_object_Database(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &Database_object_handlers);}
static void SWIG_Php_free_obj_Database(zend_object *object) {delete (Xapian::Database *)SWIG_Php_free_obj(object);}

static zend_class_entry *SWIG_Php_ce_WritableDatabase;

static zend_object_handlers WritableDatabase_object_handlers;
static zend_object *SWIG_Php_create_object_WritableDatabase(zend_class_entry *ce) {return SWIG_Php_do_create_object(ce, &WritableDatabase_object_handlers);}
static void SWIG_Php_free_obj_WritableDatabase(zend_object *object) {delete (Xapian::WritableDatabase *)SWIG_Php_free_obj(object);}

/* class entry for pointer to _p_flags */
static zend_class_entry *SWIG_Php_ce__p_flags;

/* class entry for pointer to _p_compaction_level */
static zend_class_entry *SWIG_Php_ce__p_compaction_level;

/* class entry for pointer to _p_Query */
static zend_class_entry *SWIG_Php_ce__p_Query;

/* class entry for pointer to _unsigned_int */
static zend_class_entry *SWIG_Php_ce__unsigned_int;

/* class entry for pointer to _p_reference */
static zend_class_entry *SWIG_Php_ce__p_reference;

/* class entry for pointer to _p_int */
static zend_class_entry *SWIG_Php_ce__p_int;

/* class entry for pointer to _p_unsigned_int */
static zend_class_entry *SWIG_Php_ce__p_unsigned_int;

/* class entry for pointer to _p_docid_order */
static zend_class_entry *SWIG_Php_ce__p_docid_order;

/* class entry for pointer to _p_stem_strategy */
static zend_class_entry *SWIG_Php_ce__p_stem_strategy;

/* class entry for pointer to _p_unsigned_long */
static zend_class_entry *SWIG_Php_ce__p_unsigned_long;

/* class entry for pointer to _p_type_smoothing */
static zend_class_entry *SWIG_Php_ce__p_type_smoothing;

/* class entry for pointer to _p_double */
static zend_class_entry *SWIG_Php_ce__p_double;

/* class entry for pointer to _p_stop_strategy */
static zend_class_entry *SWIG_Php_ce__p_stop_strategy;

/* class entry for pointer to _p_const_reference */
static zend_class_entry *SWIG_Php_ce__p_const_reference;

/* class entry for pointer to _p_feature_flag */
static zend_class_entry *SWIG_Php_ce__p_feature_flag;

/* class entry for pointer to _int */
static zend_class_entry *SWIG_Php_ce__int;

/* class entry for pointer to _p_std__string */
static zend_class_entry *SWIG_Php_ce__p_std__string;


/* -------- 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__ExpandDeciderAndTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderAnd *) x));
}
static void *_p_Xapian__ExpandDeciderFilterPrefixTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderFilterPrefix *) x));
}
static void *_p_Xapian__ExpandDeciderFilterTermsTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderFilterTerms *) x));
}
static void *_p_Xapian__LatLongDistanceKeyMakerTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::KeyMaker *)  ((Xapian::LatLongDistanceKeyMaker *) x));
}
static void *_p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::KeyMaker *)  ((Xapian::MultiValueKeyMaker *) x));
}
static void *_p_Xapian__GreatCircleMetricTo_p_Xapian__LatLongMetric(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LatLongMetric *)  ((Xapian::GreatCircleMetric *) x));
}
static void *_p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::MatchDecider *)  ((Xapian::ValueSetMatchDecider *) x));
}
static void *_p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::MatchSpy *)  ((Xapian::ValueCountMatchSpy *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *)(Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *)  ((Xapian::FixedWeightPostingSource *) x));
}
static void *_p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::LatLongDistancePostingSource *) x));
}
static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueMapPostingSource *) x));
}
static void *_p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *)  ((Xapian::ValuePostingSource *) x));
}
static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueWeightPostingSource *) x));
}
static void *_p_Xapian__DateRangeProcessorTo_p_Xapian__RangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RangeProcessor *)  ((Xapian::DateRangeProcessor *) x));
}
static void *_p_Xapian__NumberRangeProcessorTo_p_Xapian__RangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RangeProcessor *)  ((Xapian::NumberRangeProcessor *) x));
}
static void *_p_Xapian__SimpleStopperTo_p_Xapian__Stopper(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Stopper *)  ((Xapian::SimpleStopper *) x));
}
static void *_p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::StringValueRangeProcessor *)  ((Xapian::DateValueRangeProcessor *) x));
}
static void *_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::StringValueRangeProcessor *)  ((Xapian::NumberValueRangeProcessor *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *) (Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::LatLongDistancePostingSource *) x));
}
static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueMapPostingSource *) x));
}
static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueWeightPostingSource *) x));
}
static void *_p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueRangeProcessor *) (Xapian::StringValueRangeProcessor *) ((Xapian::DateValueRangeProcessor *) x));
}
static void *_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueRangeProcessor *) (Xapian::StringValueRangeProcessor *) ((Xapian::NumberValueRangeProcessor *) x));
}
static void *_p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueRangeProcessor *)  ((Xapian::StringValueRangeProcessor *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueWeightPostingSource *)  ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__BB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BB2Weight *) x));
}
static void *_p_Xapian__BM25PlusWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BM25PlusWeight *) x));
}
static void *_p_Xapian__BM25WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BM25Weight *) x));
}
static void *_p_Xapian__BoolWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BoolWeight *) x));
}
static void *_p_Xapian__CoordWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::CoordWeight *) x));
}
static void *_p_Xapian__DLHWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::DLHWeight *) x));
}
static void *_p_Xapian__DPHWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::DPHWeight *) x));
}
static void *_p_Xapian__IfB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::IfB2Weight *) x));
}
static void *_p_Xapian__InL2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::InL2Weight *) x));
}
static void *_p_Xapian__IneB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::IneB2Weight *) x));
}
static void *_p_Xapian__LMWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::LMWeight *) x));
}
static void *_p_Xapian__PL2PlusWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::PL2PlusWeight *) x));
}
static void *_p_Xapian__PL2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::PL2Weight *) x));
}
static void *_p_Xapian__TfIdfWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::TfIdfWeight *) x));
}
static void *_p_Xapian__TradWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::TradWeight *) x));
}
static swig_type_info _swigt__int = {"_int", "int", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Query = {"_p_Query", "Query *", 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_const_reference = {"_p_const_reference", "const_reference *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_docid_order = {"_p_docid_order", "docid_order *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "Xapian::doclength *|Xapian::weight *|double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_feature_flag = {"_p_feature_flag", "feature_flag *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_flags = {"_p_flags", "flags *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "Xapian::doccount_diff *|Xapian::percent *|Xapian::termcount_diff *|Xapian::termpos_diff *|Xapian::valueno_diff *|int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_reference = {"_p_reference", "reference *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_stem_strategy = {"_p_stem_strategy", "stem_strategy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_stop_strategy = {"_p_stop_strategy", "stop_strategy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_type_smoothing = {"_p_type_smoothing", "type_smoothing *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "Xapian::doccount *|Xapian::docid *|Xapian::termcount *|Xapian::termpos *|Xapian::timeout *|Xapian::valueno *|unsigned int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "Xapian::rev *|Xapian::totallength *|unsigned long *", 0, 0, (void*)0, 0};
static swig_type_info _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_Query,
  &_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_const_reference,
  &_swigt__p_docid_order,
  &_swigt__p_double,
  &_swigt__p_feature_flag,
  &_swigt__p_flags,
  &_swigt__p_int,
  &_swigt__p_reference,
  &_swigt__p_std__string,
  &_swigt__p_stem_strategy,
  &_swigt__p_stop_strategy,
  &_swigt__p_type_smoothing,
  &_swigt__p_unsigned_int,
  &_swigt__p_unsigned_long,
  &_swigt__unsigned_int,
};

static swig_cast_info _swigc__int[] = {  {&_swigt__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Query[] = {  {&_swigt__p_Query, 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__ExpandDecider, 0, 0, 0},  {&_swigt__p_Xapian__ExpandDeciderAnd, _p_Xapian__ExpandDeciderAndTo_p_Xapian__ExpandDecider, 0, 0},  {&_swigt__p_Xapian__ExpandDeciderFilterPrefix, _p_Xapian__ExpandDeciderFilterPrefixTo_p_Xapian__ExpandDecider, 0, 0},  {&_swigt__p_Xapian__ExpandDeciderFilterTerms, _p_Xapian__ExpandDeciderFilterTermsTo_p_Xapian__ExpandDecider, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ExpandDeciderAnd[] = {  {&_swigt__p_Xapian__ExpandDeciderAnd, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ExpandDeciderFilterPrefix[] = {  {&_swigt__p_Xapian__ExpandDeciderFilterPrefix, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__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__LatLongDistanceKeyMaker, _p_Xapian__LatLongDistanceKeyMakerTo_p_Xapian__KeyMaker, 0, 0},  {&_swigt__p_Xapian__MultiValueKeyMaker, _p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LMWeight[] = {  {&_swigt__p_Xapian__LMWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongCoord[] = {  {&_swigt__p_Xapian__LatLongCoord, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongCoords[] = {  {&_swigt__p_Xapian__LatLongCoords, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongCoordsIterator[] = {  {&_swigt__p_Xapian__LatLongCoordsIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongDistanceKeyMaker[] = {  {&_swigt__p_Xapian__LatLongDistanceKeyMaker, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongDistancePostingSource[] = {  {&_swigt__p_Xapian__LatLongDistancePostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongMetric[] = {  {&_swigt__p_Xapian__LatLongMetric, 0, 0, 0},  {&_swigt__p_Xapian__GreatCircleMetric, _p_Xapian__GreatCircleMetricTo_p_Xapian__LatLongMetric, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__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__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__FixedWeightPostingSource, _p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__LatLongDistancePostingSource, _p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__ValuePostingSource, _p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Query[] = {  {&_swigt__p_Xapian__Query, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__QueryParser[] = {  {&_swigt__p_Xapian__QueryParser, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__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__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__LatLongDistancePostingSource, _p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueRangeProcessor[] = {  {&_swigt__p_Xapian__ValueRangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__StringValueRangeProcessor, _p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueSetMatchDecider[] = {  {&_swigt__p_Xapian__ValueSetMatchDecider, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueWeightPostingSource[] = {  {&_swigt__p_Xapian__ValueWeightPostingSource, 0, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Weight[] = {  {&_swigt__p_Xapian__Weight, 0, 0, 0},  {&_swigt__p_Xapian__BB2Weight, _p_Xapian__BB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BM25PlusWeight, _p_Xapian__BM25PlusWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BM25Weight, _p_Xapian__BM25WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BoolWeight, _p_Xapian__BoolWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__CoordWeight, _p_Xapian__CoordWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__DLHWeight, _p_Xapian__DLHWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__DPHWeight, _p_Xapian__DPHWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__IfB2Weight, _p_Xapian__IfB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__InL2Weight, _p_Xapian__InL2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__IneB2Weight, _p_Xapian__IneB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__LMWeight, _p_Xapian__LMWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__PL2PlusWeight, _p_Xapian__PL2PlusWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__PL2Weight, _p_Xapian__PL2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TfIdfWeight, _p_Xapian__TfIdfWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TradWeight, _p_Xapian__TradWeightTo_p_Xapian__Weight, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__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_const_reference[] = {  {&_swigt__p_const_reference, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_docid_order[] = {  {&_swigt__p_docid_order, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_feature_flag[] = {  {&_swigt__p_feature_flag, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_flags[] = {  {&_swigt__p_flags, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_reference[] = {  {&_swigt__p_reference, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__string[] = {  {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_stem_strategy[] = {  {&_swigt__p_stem_strategy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_stop_strategy[] = {  {&_swigt__p_stop_strategy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_type_smoothing[] = {  {&_swigt__p_type_smoothing, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__unsigned_int[] = {  {&_swigt__unsigned_int, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__int,
  _swigc__p_Query,
  _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_const_reference,
  _swigc__p_docid_order,
  _swigc__p_double,
  _swigc__p_feature_flag,
  _swigc__p_flags,
  _swigc__p_int,
  _swigc__p_reference,
  _swigc__p_std__string,
  _swigc__p_stem_strategy,
  _swigc__p_stop_strategy,
  _swigc__p_type_smoothing,
  _swigc__p_unsigned_int,
  _swigc__p_unsigned_long,
  _swigc__unsigned_int,
};


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

/* end header section */

#include "xapian_wrap.h"

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



SwigDirector_StemImplementation::~SwigDirector_StemImplementation() {
}

std::string SwigDirector_StemImplementation::operator ()(std::string const &word) {
  std::string c_result;
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_STRINGL(&args[0], (&word)->data(), (&word)->size());
  
  {
    zend_string *swig_funcname = zend_string_init("apply", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


std::string SwigDirector_StemImplementation::get_description() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_description", 15, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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



bool SwigDirector_MatchDecider::operator ()(Xapian::Document const &doc) const {
  bool c_result = SwigValueInit< bool >() ;
  
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_UNDEF(&args[0]);
  SWIG_SetPointerZval(&args[0], (void *)&doc, SWIGTYPE_p_Xapian__Document, 0);
  
  {
    zend_string *swig_funcname = zend_string_init("apply", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
    c_result = (bool) zval_is_true(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (bool) c_result;
}


SwigDirector_MatchDecider::~SwigDirector_MatchDecider() {
}

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



bool SwigDirector_ExpandDecider::operator ()(std::string const &term) const {
  bool c_result = SwigValueInit< bool >() ;
  
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_STRINGL(&args[0], (&term)->data(), (&term)->size());
  
  {
    zend_string *swig_funcname = zend_string_init("apply", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
    c_result = (bool) zval_is_true(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (bool) c_result;
}


SwigDirector_ExpandDecider::~SwigDirector_ExpandDecider() {
}

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



std::string SwigDirector_KeyMaker::operator ()(Xapian::Document const &doc) const {
  std::string c_result;
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_UNDEF(&args[0]);
  SWIG_SetPointerZval(&args[0], (void *)&doc, SWIGTYPE_p_Xapian__Document, 0);
  
  {
    zend_string *swig_funcname = zend_string_init("apply", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


SwigDirector_KeyMaker::~SwigDirector_KeyMaker() {
}

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



bool SwigDirector_Stopper::operator ()(std::string const &term) const {
  bool c_result = SwigValueInit< bool >() ;
  
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_STRINGL(&args[0], (&term)->data(), (&term)->size());
  
  {
    zend_string *swig_funcname = zend_string_init("apply", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
    c_result = (bool) zval_is_true(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (bool) c_result;
}


SwigDirector_Stopper::~SwigDirector_Stopper() {
}

std::string SwigDirector_Stopper::get_description() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_description", 15, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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



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



SwigDirector_RangeProcessor::~SwigDirector_RangeProcessor() {
}

Xapian::Query SwigDirector_RangeProcessor::operator ()(std::string const &begin,std::string const &end) {
  Xapian::Query *tmp ;
  
  Xapian::Query c_result;
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_STRINGL(&args[0], (&begin)->data(), (&begin)->size());
  
  
  ZVAL_STRINGL(&args[1], (&end)->data(), (&end)->size());
  
  {
    zend_string *swig_funcname = zend_string_init("apply", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    if (SWIG_ConvertPtr(result, (void **) &tmp, SWIGTYPE_p_Xapian__Query, 0) < 0 || tmp == NULL) {
      zend_type_error("Expected SWIGTYPE_p_Xapian__Query for argument 0 of apply");
      SWIG_fail;
    }
    c_result = *tmp;
    
  }
  fail: ;
  return (Xapian::Query) c_result;
}


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



SwigDirector_ValueRangeProcessor::~SwigDirector_ValueRangeProcessor() {
}

Xapian::valueno SwigDirector_ValueRangeProcessor::operator ()(std::string &begin,std::string &end) {
  Xapian::valueno c_result = SwigValueInit< Xapian::valueno >() ;
  
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_UNDEF(&args[0]);
  SWIG_SetPointerZval(&args[0], (void *)&begin, SWIGTYPE_p_std__string, 0);
  
  
  ZVAL_UNDEF(&args[1]);
  SWIG_SetPointerZval(&args[1], (void *)&end, SWIGTYPE_p_std__string, 0);
  
  {
    zend_string *swig_funcname = zend_string_init("apply", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::valueno) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::valueno) c_result;
}


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



SwigDirector_FieldProcessor::~SwigDirector_FieldProcessor() {
}

Xapian::Query SwigDirector_FieldProcessor::operator ()(std::string const &str) {
  Xapian::Query *tmp ;
  
  Xapian::Query c_result;
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_STRINGL(&args[0], (&str)->data(), (&str)->size());
  
  {
    zend_string *swig_funcname = zend_string_init("apply", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    if (SWIG_ConvertPtr(result, (void **) &tmp, SWIGTYPE_p_Xapian__Query, 0) < 0 || tmp == NULL) {
      zend_type_error("Expected SWIGTYPE_p_Xapian__Query for argument 0 of apply");
      SWIG_fail;
    }
    c_result = *tmp;
    
  }
  fail: ;
  return (Xapian::Query) c_result;
}


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



SwigDirector_Compactor::~SwigDirector_Compactor() {
}

void SwigDirector_Compactor::set_status(std::string const &table,std::string const &status) {
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_STRINGL(&args[0], (&table)->data(), (&table)->size());
  
  
  ZVAL_STRINGL(&args[1], (&status)->data(), (&status)->size());
  
  {
    zend_string *swig_funcname = zend_string_init("set_status", 10, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


std::string SwigDirector_Compactor::resolve_duplicate_metadata(std::string const &key,size_t num_tags,std::string const tags[]) {
  std::string c_result;
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_STRINGL(&args[0], (&key)->data(), (&key)->size());
  
  {
    array_init_size(&args[1], num_tags);
    
    for (size_t i = 0; i != num_tags; ++i) {
      const string& term = tags[i];
      add_next_index_stringl(&args[1], term.data(), term.length());
    }
  }
  {
    zend_string *swig_funcname = zend_string_init("resolve_duplicate_metadata", 26, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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



SwigDirector_PostingSource::~SwigDirector_PostingSource() {
}

Xapian::doccount SwigDirector_PostingSource::get_termfreq_min() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_termfreq_min", 16, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::doccount) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::doccount) c_result;
}


Xapian::doccount SwigDirector_PostingSource::get_termfreq_est() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_termfreq_est", 16, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::doccount) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::doccount) c_result;
}


Xapian::doccount SwigDirector_PostingSource::get_termfreq_max() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_termfreq_max", 16, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::doccount) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::doccount) c_result;
}


double SwigDirector_PostingSource::get_weight() const {
  double c_result = SwigValueInit< double >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_weight", 10, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
    c_result = (double) zval_get_double(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (double) c_result;
}


Xapian::docid SwigDirector_PostingSource::get_docid() const {
  Xapian::docid c_result = SwigValueInit< Xapian::docid >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_docid", 9, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::docid) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::docid) c_result;
}


void SwigDirector_PostingSource::next(double min_wt) {
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_DOUBLE(&args[0], min_wt);
  
  {
    zend_string *swig_funcname = zend_string_init("next", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


void SwigDirector_PostingSource::skip_to(Xapian::docid did,double min_wt) {
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_LONG(&args[0],did);
  
  
  ZVAL_DOUBLE(&args[1], min_wt);
  
  {
    zend_string *swig_funcname = zend_string_init("skip_to", 7, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


bool SwigDirector_PostingSource::check(Xapian::docid did,double min_wt) {
  bool c_result = SwigValueInit< bool >() ;
  
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_LONG(&args[0],did);
  
  
  ZVAL_DOUBLE(&args[1], min_wt);
  
  {
    zend_string *swig_funcname = zend_string_init("check", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
    c_result = (bool) zval_is_true(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (bool) c_result;
}


bool SwigDirector_PostingSource::at_end() const {
  bool c_result = SwigValueInit< bool >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("at_end", 6, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
    c_result = (bool) zval_is_true(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (bool) c_result;
}


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


std::string SwigDirector_PostingSource::name() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("name", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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


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


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


void SwigDirector_PostingSource::init(Xapian::Database const &db) {
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_UNDEF(&args[0]);
  SWIG_SetPointerZval(&args[0], (void *)&db, SWIGTYPE_p_Xapian__Database, 0);
  
  {
    zend_string *swig_funcname = zend_string_init("init", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


std::string SwigDirector_PostingSource::get_description() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_description", 15, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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



SwigDirector_ValuePostingSource::~SwigDirector_ValuePostingSource() {
}

Xapian::doccount SwigDirector_ValuePostingSource::get_termfreq_min() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_termfreq_min", 16, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::doccount) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::doccount) c_result;
}


Xapian::doccount SwigDirector_ValuePostingSource::get_termfreq_est() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_termfreq_est", 16, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::doccount) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::doccount) c_result;
}


Xapian::doccount SwigDirector_ValuePostingSource::get_termfreq_max() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_termfreq_max", 16, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::doccount) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::doccount) c_result;
}


double SwigDirector_ValuePostingSource::get_weight() const {
  double c_result = SwigValueInit< double >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_weight", 10, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
    c_result = (double) zval_get_double(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (double) c_result;
}


Xapian::docid SwigDirector_ValuePostingSource::get_docid() const {
  Xapian::docid c_result = SwigValueInit< Xapian::docid >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_docid", 9, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::docid) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::docid) c_result;
}


void SwigDirector_ValuePostingSource::next(double min_wt) {
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_DOUBLE(&args[0], min_wt);
  
  {
    zend_string *swig_funcname = zend_string_init("next", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


void SwigDirector_ValuePostingSource::skip_to(Xapian::docid min_docid,double min_wt) {
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_LONG(&args[0],min_docid);
  
  
  ZVAL_DOUBLE(&args[1], min_wt);
  
  {
    zend_string *swig_funcname = zend_string_init("skip_to", 7, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


bool SwigDirector_ValuePostingSource::check(Xapian::docid min_docid,double min_wt) {
  bool c_result = SwigValueInit< bool >() ;
  
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_LONG(&args[0],min_docid);
  
  
  ZVAL_DOUBLE(&args[1], min_wt);
  
  {
    zend_string *swig_funcname = zend_string_init("check", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
    c_result = (bool) zval_is_true(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (bool) c_result;
}


bool SwigDirector_ValuePostingSource::at_end() const {
  bool c_result = SwigValueInit< bool >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("at_end", 6, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
    c_result = (bool) zval_is_true(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (bool) c_result;
}


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


std::string SwigDirector_ValuePostingSource::name() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("name", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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


Xapian::PostingSource *SwigDirector_ValuePostingSource::unserialise(std::string const &serialised) const {
  return Xapian::PostingSource::unserialise(serialised);
  fail: ;
}


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


void SwigDirector_ValuePostingSource::init(Xapian::Database const &db_) {
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_UNDEF(&args[0]);
  SWIG_SetPointerZval(&args[0], (void *)&db_, SWIGTYPE_p_Xapian__Database, 0);
  
  {
    zend_string *swig_funcname = zend_string_init("init", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


std::string SwigDirector_ValuePostingSource::get_description() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_description", 15, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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



SwigDirector_ValueWeightPostingSource::~SwigDirector_ValueWeightPostingSource() {
}

Xapian::doccount SwigDirector_ValueWeightPostingSource::get_termfreq_min() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_termfreq_min", 16, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::doccount) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::doccount) c_result;
}


Xapian::doccount SwigDirector_ValueWeightPostingSource::get_termfreq_est() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_termfreq_est", 16, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::doccount) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::doccount) c_result;
}


Xapian::doccount SwigDirector_ValueWeightPostingSource::get_termfreq_max() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_termfreq_max", 16, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::doccount) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::doccount) c_result;
}


double SwigDirector_ValueWeightPostingSource::get_weight() const {
  double c_result = SwigValueInit< double >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_weight", 10, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
    c_result = (double) zval_get_double(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (double) c_result;
}


Xapian::docid SwigDirector_ValueWeightPostingSource::get_docid() const {
  Xapian::docid c_result = SwigValueInit< Xapian::docid >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_docid", 9, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
    c_result = (Xapian::docid) zval_get_long(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (Xapian::docid) c_result;
}


void SwigDirector_ValueWeightPostingSource::next(double min_wt) {
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_DOUBLE(&args[0], min_wt);
  
  {
    zend_string *swig_funcname = zend_string_init("next", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


void SwigDirector_ValueWeightPostingSource::skip_to(Xapian::docid min_docid,double min_wt) {
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_LONG(&args[0],min_docid);
  
  
  ZVAL_DOUBLE(&args[1], min_wt);
  
  {
    zend_string *swig_funcname = zend_string_init("skip_to", 7, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


bool SwigDirector_ValueWeightPostingSource::check(Xapian::docid min_docid,double min_wt) {
  bool c_result = SwigValueInit< bool >() ;
  
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_LONG(&args[0],min_docid);
  
  
  ZVAL_DOUBLE(&args[1], min_wt);
  
  {
    zend_string *swig_funcname = zend_string_init("check", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
    c_result = (bool) zval_is_true(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (bool) c_result;
}


bool SwigDirector_ValueWeightPostingSource::at_end() const {
  bool c_result = SwigValueInit< bool >() ;
  
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("at_end", 6, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
    c_result = (bool) zval_is_true(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (bool) c_result;
}


Xapian::ValueWeightPostingSource *SwigDirector_ValueWeightPostingSource::clone() const {
  return Xapian::ValueWeightPostingSource::clone();
  fail: ;
}


std::string SwigDirector_ValueWeightPostingSource::name() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("name", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


std::string SwigDirector_ValueWeightPostingSource::serialise() const {
  return Xapian::ValueWeightPostingSource::serialise();
  fail: ;
}


Xapian::ValueWeightPostingSource *SwigDirector_ValueWeightPostingSource::unserialise(std::string const &serialised) const {
  return Xapian::ValueWeightPostingSource::unserialise(serialised);
  fail: ;
}


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


void SwigDirector_ValueWeightPostingSource::init(Xapian::Database const &db_) {
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_UNDEF(&args[0]);
  SWIG_SetPointerZval(&args[0], (void *)&db_, SWIGTYPE_p_Xapian__Database, 0);
  
  {
    zend_string *swig_funcname = zend_string_init("init", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


std::string SwigDirector_ValueWeightPostingSource::get_description() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_description", 15, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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



SwigDirector_MatchSpy::~SwigDirector_MatchSpy() {
}

void SwigDirector_MatchSpy::operator ()(Xapian::Document const &doc,double wt) {
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_UNDEF(&args[0]);
  SWIG_SetPointerZval(&args[0], (void *)&doc, SWIGTYPE_p_Xapian__Document, 0);
  
  
  ZVAL_DOUBLE(&args[1], wt);
  
  {
    zend_string *swig_funcname = zend_string_init("apply", 5, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


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


std::string SwigDirector_MatchSpy::name() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("name", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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


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


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


void SwigDirector_MatchSpy::merge_results(std::string const &serialised) {
  zval args[1];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_STRINGL(&args[0], (&serialised)->data(), (&serialised)->size());
  
  {
    zend_string *swig_funcname = zend_string_init("merge_results", 13, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 1, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    
  }
  fail: ;
}


std::string SwigDirector_MatchSpy::get_description() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("get_description", 15, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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



SwigDirector_LatLongMetric::~SwigDirector_LatLongMetric() {
}

double SwigDirector_LatLongMetric::pointwise_distance(Xapian::LatLongCoord const &a,Xapian::LatLongCoord const &b) const {
  double c_result = SwigValueInit< double >() ;
  
  zval args[2];
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  
  ZVAL_UNDEF(&args[0]);
  SWIG_SetPointerZval(&args[0], (void *)&a, SWIGTYPE_p_Xapian__LatLongCoord, 0);
  
  
  ZVAL_UNDEF(&args[1]);
  SWIG_SetPointerZval(&args[1], (void *)&b, SWIGTYPE_p_Xapian__LatLongCoord, 0);
  
  {
    zend_string *swig_funcname = zend_string_init("pointwise_distance", 18, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 2, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
    c_result = (double) zval_get_double(&*result);
    /*@SWIG@*/;
    
  }
  fail: ;
  return (double) c_result;
}


Xapian::LatLongMetric *SwigDirector_LatLongMetric::clone() const {
  Xapian::LatLongMetric *c_result = 0 ;
  
  Swig::DirectorPureVirtualException::raise("Attempted to invoke pure virtual method Xapian::LatLongMetric::clone");
  fail: ;
  return (Xapian::LatLongMetric *) c_result;
}


std::string SwigDirector_LatLongMetric::name() const {
  std::string c_result;
  zval *args = NULL;
  zval swig_zval_result;
  zval * SWIGUNUSED result = &swig_zval_result;
  {
    zend_string *swig_funcname = zend_string_init("name", 4, 0);
    zend_function *swig_zend_func = zend_std_get_method(&Z_OBJ(swig_self), swig_funcname, NULL);
    zend_string_release(swig_funcname);
    if (swig_zend_func) zend_call_known_instance_method(swig_zend_func, Z_OBJ(swig_self), &swig_zval_result, 0, args);
    if (EG(exception)) SWIG_fail;
  }
  {
    convert_to_string(result);
    c_result.assign(Z_STRVAL_P(result), Z_STRLEN_P(result));
    
  }
  fail: ;
  return (std::string) c_result;
}


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


Xapian::LatLongMetric *SwigDirector_LatLongMetric::unserialise(std::string const &serialised) const {
  Xapian::LatLongMetric *c_result = 0 ;
  
  Swig::DirectorPureVirtualException::raise("Attempted to invoke pure virtual method Xapian::LatLongMetric::unserialise");
  fail: ;
  return (Xapian::LatLongMetric *) c_result;
}


/* vdecl subsection */
/* end vdecl subsection */
/* wrapper section */
static PHP_METHOD(Xapian,version_string) {
  PHP_FN(version_string)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_FUNCTION(version_string) {
  char *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (char *)Xapian::version_string();
  
  if (!result) {
    RETVAL_NULL();
  } else {
    RETVAL_STRING((const char *)result);
  }
  
fail:
  return;
}


static PHP_METHOD(Xapian,major_version) {
  PHP_FN(major_version)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_FUNCTION(major_version) {
  int result;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (int)Xapian::major_version();
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(Xapian,minor_version) {
  PHP_FN(minor_version)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_FUNCTION(minor_version) {
  int result;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (int)Xapian::minor_version();
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(Xapian,revision) {
  PHP_FN(revision)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_FUNCTION(revision) {
  int result;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (int)Xapian::revision();
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPositionIterator,__construct) {
  Xapian::PositionIterator *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::PositionIterator *)new Xapian::PositionIterator();
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__PositionIterator, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianPositionIterator,skip_to) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::termpos arg2 ;
  zval args[1];
  
  arg1 = (Xapian::PositionIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termpos) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianPositionIterator,get_description) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::PositionIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::PositionIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianPositionIterator,key) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::PositionIterator *result = 0 ;
  
  arg1 = (Xapian::PositionIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::PositionIterator *) &Xapian_PositionIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PositionIterator, 0);
  
fail:
  return;
}


static PHP_METHOD(XapianPositionIterator,current) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::termpos result;
  
  arg1 = (Xapian::PositionIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::termpos)Xapian_PositionIterator_current(arg1);
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPositionIterator,valid) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  bool result;
  
  arg1 = (Xapian::PositionIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (bool)Xapian_PositionIterator_valid(arg1);
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianPositionIterator,rewind) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  
  arg1 = (Xapian::PositionIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  Xapian_PositionIterator_rewind(arg1);
  
fail:
  return;
}


static PHP_METHOD(XapianPositionIterator,equals) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::PositionIterator *arg2 = 0 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::PositionIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__PositionIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__PositionIterator for argument 2 of PositionIterator_equals");
    return;
  }
  
  {
    try {
      result = (bool)Xapian_PositionIterator_equals((Xapian::PositionIterator const *)arg1,(Xapian::PositionIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianPositionIterator,get_termpos) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::termpos result;
  
  arg1 = (Xapian::PositionIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termpos)Xapian_PositionIterator_get_termpos((Xapian::PositionIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPositionIterator,next) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  
  arg1 = (Xapian::PositionIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      Xapian_PositionIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}




PHP_METHOD(XapianPositionIterator,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianPositionIterator,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianPositionIterator,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianPostingIterator,__construct) {
  Xapian::PostingIterator *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::PostingIterator *)new Xapian::PostingIterator();
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__PostingIterator, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,get_wdf) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_wdf();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,get_doclength) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_doclength();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,get_unique_terms) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_unique_terms();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,positionlist_begin) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::PostingIterator const *)arg1)->positionlist_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,positionlist_end) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::PostingIterator const *)arg1)->positionlist_end();
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,skip_to) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,get_description) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::PostingIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,key) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PostingIterator *result = 0 ;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::PostingIterator *) &Xapian_PostingIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PostingIterator, 0);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,current) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::docid)Xapian_PostingIterator_current(arg1);
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,valid) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  bool result;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (bool)Xapian_PostingIterator_valid(arg1);
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,rewind) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  Xapian_PostingIterator_rewind(arg1);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,equals) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PostingIterator *arg2 = 0 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__PostingIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__PostingIterator for argument 2 of PostingIterator_equals");
    return;
  }
  
  {
    try {
      result = (bool)Xapian_PostingIterator_equals((Xapian::PostingIterator const *)arg1,(Xapian::PostingIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,get_docid) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::docid)Xapian_PostingIterator_get_docid((Xapian::PostingIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingIterator,next) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  
  arg1 = (Xapian::PostingIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      Xapian_PostingIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}




PHP_METHOD(XapianPostingIterator,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianPostingIterator,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianPostingIterator,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianTermIterator,__construct) {
  Xapian::TermIterator *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::TermIterator *)new Xapian::TermIterator();
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__TermIterator, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,get_wdf) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->get_wdf();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,get_termfreq) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::TermIterator const *)arg1)->get_termfreq();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,positionlist_count) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->positionlist_count();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,positionlist_begin) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::TermIterator const *)arg1)->positionlist_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,positionlist_end) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::TermIterator const *)arg1)->positionlist_end();
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,skip_to) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->skip_to((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,get_description) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::TermIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,key) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::TermIterator *result = 0 ;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::TermIterator *) &Xapian_TermIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__TermIterator, 0);
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,current) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = Xapian_TermIterator_current(arg1);
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,valid) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  bool result;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (bool)Xapian_TermIterator_valid(arg1);
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,rewind) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  Xapian_TermIterator_rewind(arg1);
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,equals) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::TermIterator *arg2 = 0 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__TermIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__TermIterator for argument 2 of TermIterator_equals");
    return;
  }
  
  {
    try {
      result = (bool)Xapian_TermIterator_equals((Xapian::TermIterator const *)arg1,(Xapian::TermIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,get_term) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = Xapian_TermIterator_get_term((Xapian::TermIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianTermIterator,next) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  
  arg1 = (Xapian::TermIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      Xapian_TermIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}




PHP_METHOD(XapianTermIterator,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianTermIterator,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianTermIterator,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianValueIterator,__construct) {
  Xapian::ValueIterator *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::ValueIterator *)new Xapian::ValueIterator();
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ValueIterator, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,get_docid) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::docid)((Xapian::ValueIterator const *)arg1)->get_docid();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,get_valueno) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::valueno result;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::valueno)((Xapian::ValueIterator const *)arg1)->get_valueno();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,skip_to) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,check) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (bool)(arg1)->check(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,get_description) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ValueIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,key) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::ValueIterator *result = 0 ;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::ValueIterator *) &Xapian_ValueIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueIterator, 0);
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,current) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = Xapian_ValueIterator_current(arg1);
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,valid) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  bool result;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (bool)Xapian_ValueIterator_valid(arg1);
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,rewind) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  Xapian_ValueIterator_rewind(arg1);
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,equals) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::ValueIterator *arg2 = 0 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__ValueIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ValueIterator for argument 2 of ValueIterator_equals");
    return;
  }
  
  {
    try {
      result = (bool)Xapian_ValueIterator_equals((Xapian::ValueIterator const *)arg1,(Xapian::ValueIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,get_value) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = Xapian_ValueIterator_get_value((Xapian::ValueIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianValueIterator,next) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  
  arg1 = (Xapian::ValueIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      Xapian_ValueIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}




PHP_METHOD(XapianValueIterator,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianValueIterator,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianValueIterator,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianDocument,__construct) {
  Xapian::Document *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::Document *)new Xapian::Document();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Document, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,get_value) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  zval args[1];
  std::string result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_value(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,add_value) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  std::string *arg3 = 0 ;
  std::string temp3 ;
  zval args[2];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      (arg1)->add_value(arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,remove_value) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  zval args[1];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->remove_value(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,clear_values) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->clear_values();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,get_data) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_data();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,set_data) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->set_data((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termpos) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_posting((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termpos) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_posting((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,add_posting) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Document_add_posting__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_Document_add_posting__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Document_add_posting'", 0);
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_term((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Document_add_term__SWIG_1) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->add_term((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,add_term) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Document_add_term__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Document_add_term__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Document_add_term'", 0);
fail:
  return;
}


static PHP_METHOD(XapianDocument,add_boolean_term) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->add_boolean_term((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termpos) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->remove_posting((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termpos) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->remove_posting((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,remove_posting) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Document_remove_posting__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_Document_remove_posting__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Document_remove_posting'", 0);
fail:
  return;
}


static 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[4];
  Xapian::termpos result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termpos) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termpos) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg5 = (Xapian::termcount) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::termpos)(arg1)->remove_postings((std::string const &)*arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static 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[3];
  Xapian::termpos result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termpos) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termpos) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::termpos)(arg1)->remove_postings((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,remove_postings) {
  int argc;
  zval argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_Document_remove_postings__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[3])) &&
            (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            _wrap_Document_remove_postings__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Document_remove_postings'", 0);
fail:
  return;
}


static PHP_METHOD(XapianDocument,remove_term) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->remove_term((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,clear_terms) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->clear_terms();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,termlist_count) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Document const *)arg1)->termlist_count();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,termlist_begin) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Document const *)arg1)->termlist_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDocument,termlist_end) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::Document const *)arg1)->termlist_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDocument,values_count) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Document const *)arg1)->values_count();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,values_begin) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::ValueIterator result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Document const *)arg1)->values_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ValueIterator * resultobj = new Xapian::ValueIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ValueIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDocument,values_end) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::ValueIterator result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::Document const *)arg1)->values_end();
  {
    Xapian::ValueIterator * resultobj = new Xapian::ValueIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ValueIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDocument,get_docid) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::docid)((Xapian::Document const *)arg1)->get_docid();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,serialise) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Document const *)arg1)->serialise();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDocument,unserialise) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  Xapian::Document result;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = Xapian::Document::unserialise((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Document * resultobj = new Xapian::Document(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Document, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDocument,get_description) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Document *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianDocument,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianDocument,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianDocument,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianRegistry,__construct) {
  Xapian::Registry *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::Registry *)new Xapian::Registry();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Registry, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianRegistry,register_weighting_scheme) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::Weight *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::Registry *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Weight, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Weight for argument 2 of Registry_register_weighting_scheme");
    return;
  }
  
  {
    try {
      (arg1)->register_weighting_scheme((Xapian::Weight const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianRegistry,get_weighting_scheme) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::Weight *result = 0 ;
  
  arg1 = (Xapian::Registry *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  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);
  
fail:
  return;
}


static PHP_METHOD(XapianRegistry,register_posting_source) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::PostingSource *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::Registry *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__PostingSource, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__PostingSource for argument 2 of Registry_register_posting_source");
    return;
  }
  
  {
    try {
      (arg1)->register_posting_source((Xapian::PostingSource const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianRegistry,get_posting_source) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::PostingSource *result = 0 ;
  
  arg1 = (Xapian::Registry *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  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);
  
fail:
  return;
}


static PHP_METHOD(XapianRegistry,register_match_spy) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::MatchSpy *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::Registry *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MatchSpy, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MatchSpy for argument 2 of Registry_register_match_spy");
    return;
  }
  
  {
    try {
      (arg1)->register_match_spy((Xapian::MatchSpy const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianRegistry,get_match_spy) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::MatchSpy *result = 0 ;
  
  arg1 = (Xapian::Registry *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  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);
  
fail:
  return;
}


static PHP_METHOD(XapianRegistry,register_lat_long_metric) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::LatLongMetric *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::Registry *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongMetric for argument 2 of Registry_register_lat_long_metric");
    return;
  }
  
  {
    try {
      (arg1)->register_lat_long_metric((Xapian::LatLongMetric const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianRegistry,get_lat_long_metric) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::LatLongMetric *result = 0 ;
  
  arg1 = (Xapian::Registry *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  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);
  
fail:
  return;
}




PHP_METHOD(XapianRegistry,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianRegistry,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianRegistry,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianQuery,MatchNothing) {
  Xapian::Query *result = 0 ;
  
  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);
  
fail:
  return;
}


static PHP_METHOD(XapianQuery,MatchAll) {
  Xapian::Query *result = 0 ;
  
  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);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_0) {
  Xapian::Query *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::Query *)new Xapian::Query();
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termpos) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_3) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  Xapian::Query *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_4) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  zval args[1];
  Xapian::Query *result = 0 ;
  
  if(ZEND_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) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__PostingSource for argument 1 of new_Query");
    return;
  }
  
  {
    zval* zv = zend_read_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_ps", strlen("_ps"), false, NULL);
    SEPARATE_ARRAY(zv);
    Z_ADDREF(args[0]);
    add_next_index_zval(zv, &args[0]); 
  }
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_5) {
  double arg1 ;
  Xapian::Query *arg2 = 0 ;
  zval args[2];
  Xapian::Query *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Query for argument 1 of new_Query");
    return;
  }
  
  {
    merge_ps_references(ZEND_THIS, args[1]); 
  }
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Query for argument 1 of new_Query");
    return;
  }
  
  {
    merge_ps_references(ZEND_THIS, args[1]); 
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Query for argument 1 of new_Query");
    return;
  }
  
  {
    merge_ps_references(ZEND_THIS, args[1]); 
  }
  
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg3, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Query for argument 1 of new_Query");
    return;
  }
  
  {
    merge_ps_references(ZEND_THIS, args[2]); 
  }
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,(Xapian::Query const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[2]);
  temp3.assign(Z_STRVAL(args[2]), Z_STRLEN(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(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[2]);
  temp3.assign(Z_STRVAL(args[2]), Z_STRLEN(args[2]));
  arg3 = &temp3;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[2]);
  temp3.assign(Z_STRVAL(args[2]), Z_STRLEN(args[2]));
  arg3 = &temp3;
  
  
  convert_to_string(&args[3]);
  temp4.assign(Z_STRVAL(args[3]), Z_STRLEN(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(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg5 = (Xapian::Query::op) zval_get_long(&args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_15) {
  Xapian::Query::op arg1 ;
  XapianSWIGQueryItor arg2 ;
  XapianSWIGQueryItor arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  Xapian::Query *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    // arg2 and arg3 are default initialised where SWIG declares them.
    if (Z_TYPE(args[1]) == IS_ARRAY) {
      // The typecheck typemap should have ensured this is an array.
      (&arg2)->begin(&args[1], ZEND_THIS);
      (&arg3)->end(&args[1]);
    }
  }
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_16) {
  Xapian::Query::op arg1 ;
  XapianSWIGQueryItor arg2 ;
  XapianSWIGQueryItor arg3 ;
  zval args[2];
  Xapian::Query *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    // arg2 and arg3 are default initialised where SWIG declares them.
    if (Z_TYPE(args[1]) == IS_ARRAY) {
      // The typecheck typemap should have ensured this is an array.
      (&arg2)->begin(&args[1], ZEND_THIS);
      (&arg3)->end(&args[1]);
    }
  }
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianQuery,get_terms_begin) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_terms_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianQuery,get_terms_end) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::Query const *)arg1)->get_terms_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianQuery,get_unique_terms_begin) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_unique_terms_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianQuery,get_unique_terms_end) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::Query const *)arg1)->get_unique_terms_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianQuery,get_length) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::termcount)((Xapian::Query const *)arg1)->get_length();
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianQuery,is_empty) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  bool result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (bool)((Xapian::Query const *)arg1)->empty();
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianQuery,serialise) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Query const *)arg1)->serialise();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__Registry, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Registry for argument 2 of Query_unserialise");
    return;
  }
  
  {
    try {
      result = Xapian::Query::unserialise((std::string const &)*arg1,(Xapian::Registry const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
fail:
  return;
}


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


static PHP_METHOD(XapianQuery,unserialise) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Query_unserialise__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__Registry, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _wrap_Query_unserialise__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Query_unserialise'", 0);
fail:
  return;
}


static PHP_METHOD(XapianQuery,get_type) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  Xapian::Query::op result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::Query::op)((Xapian::Query const *)arg1)->get_type();
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianQuery,get_num_subqueries) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  size_t result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::Query const *)arg1)->get_num_subqueries();
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianQuery,get_subquery) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  size_t arg2 ;
  zval args[1];
  Xapian::Query result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (size_t) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_subquery(SWIG_STD_MOVE(arg2));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianQuery,get_description) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Query *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Query__SWIG_17) {
  Xapian::Query::op arg1 ;
  zval args[1];
  Xapian::Query *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Query, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianQuery,__construct) {
  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 = 0;
    {
      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 = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_Query__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_new_Query__SWIG_17(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_new_Query__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_Query__SWIG_14(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(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_16(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
        _wrap_new_Query__SWIG_16(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _wrap_new_Query__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_new_Query__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _wrap_new_Query__SWIG_7(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_DOUBLE);
        if (_v) {
          _wrap_new_Query__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_new_Query__SWIG_8(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_new_Query__SWIG_13(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_new_Query__SWIG_9(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(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(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_new_Query__SWIG_15(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[3])) &&
            (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            _wrap_new_Query__SWIG_12(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_STRING);
        }
        if (_v) {
          {
            _v = (Z_TYPE(argv[3]) == IS_STRING);
          }
          if (_v) {
            _wrap_new_Query__SWIG_10(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[3])) &&
            (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            _v = (Z_TYPE(argv[4]) == IS_LONG &&
              (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[4])) &&
              (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[4])));
            
            if (_v) {
              _wrap_new_Query__SWIG_11(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_Query'", 0);
fail:
  return;
}




PHP_METHOD(XapianQuery,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianQuery,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianQuery,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianStemImplementation,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::StemImplementation *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_StemImplementation) {
        /* not subclassed */
        zend_throw_exception(zend_ce_type_error, "accessing abstract class or protected constructor", 0);
        return;
      } else {
        result = (Xapian::StemImplementation *)new SwigDirector_StemImplementation(arg0);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__StemImplementation, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianStemImplementation,apply) {
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::StemImplementation *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::StemImplementation::operator ()");
      } else {
        result = (arg1)->operator ()((std::string const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianStemImplementation,get_description) {
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::StemImplementation *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::StemImplementation::get_description");
      } else {
        result = ((Xapian::StemImplementation const *)arg1)->get_description();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianStemImplementation,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::StemImplementation*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianStemImplementation,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianStemImplementation,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_Stem__SWIG_0) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  Xapian::Stem *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Stem, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Stem__SWIG_1) {
  std::string *arg1 = 0 ;
  bool arg2 ;
  std::string temp1 ;
  zval args[2];
  Xapian::Stem *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg2 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Stem, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Stem__SWIG_2) {
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  zval args[1];
  Xapian::Stem *result = 0 ;
  
  if(ZEND_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) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__StemImplementation for argument 1 of new_Stem");
    return;
  }
  
  {
    try {
      result = (Xapian::Stem *)new Xapian::Stem(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Stem, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianStem,__construct) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__StemImplementation, 0) >= 0);
    }
    if (_v) {
      _wrap_new_Stem__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_Stem__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_TRUE || Z_TYPE(argv[1]) == IS_FALSE || Z_TYPE(argv[1]) == IS_LONG);
      }
      if (_v) {
        _wrap_new_Stem__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_Stem'", 0);
fail:
  return;
}


static PHP_METHOD(XapianStem,apply) {
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  std::string result;
  
  arg1 = (Xapian::Stem *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Stem const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianStem,is_none) {
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  bool result;
  
  arg1 = (Xapian::Stem *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (bool)((Xapian::Stem const *)arg1)->is_none();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianStem,get_description) {
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Stem *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Stem const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianStem,get_available_languages) {
  std::string result;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = Xapian::Stem::get_available_languages();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianStem,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianStem,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianStem,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianTermGenerator,__construct) {
  Xapian::TermGenerator *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::TermGenerator *)new Xapian::TermGenerator();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__TermGenerator, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,set_stemmer) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Stem *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Stem for argument 2 of TermGenerator_set_stemmer");
    return;
  }
  
  {
    try {
      (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_stopper__SWIG_0) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
  zval args[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Stopper, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Stopper for argument 1 of TermGenerator_set_stopper");
    return;
  }
  
  {
    zend_update_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_stopper", strlen("_stopper"), &args[0]); 
  }
  
  {
    try {
      (arg1)->set_stopper((Xapian::Stopper const *)arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_stopper__SWIG_1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->set_stopper();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,set_stopper) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_TermGenerator_set_stopper__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Stopper, 0) >= 0);
    }
    if (_v) {
      _wrap_TermGenerator_set_stopper__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'TermGenerator_set_stopper'", 0);
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,set_document) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 2 of TermGenerator_set_document");
    return;
  }
  
  {
    try {
      (arg1)->set_document((Xapian::Document const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,get_document) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Document *result = 0 ;
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::Document *) &((Xapian::TermGenerator const *)arg1)->get_document();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Document, 0);
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,set_database) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::WritableDatabase *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__WritableDatabase for argument 2 of TermGenerator_set_database");
    return;
  }
  
  {
    try {
      (arg1)->set_database((Xapian::WritableDatabase const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  Xapian::TermGenerator::flags result;
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::TermGenerator::flags) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::TermGenerator::flags) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_flags__SWIG_1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::flags arg2 ;
  zval args[1];
  Xapian::TermGenerator::flags result;
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::TermGenerator::flags) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,set_flags) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_TermGenerator_set_flags__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_TermGenerator_set_flags__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'TermGenerator_set_flags'", 0);
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,set_stemming_strategy) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::stem_strategy arg2 ;
  zval args[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::TermGenerator::stem_strategy) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_stemming_strategy(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,set_stopper_strategy) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::stop_strategy arg2 ;
  zval args[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::TermGenerator::stop_strategy) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_stopper_strategy(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,set_max_word_length) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  unsigned int arg2 ;
  zval args[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (unsigned int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_max_word_length(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[2]);
  temp4.assign(Z_STRVAL(args[2]), Z_STRLEN(args[2]));
  arg4 = &temp4;
  
  {
    try {
      (arg1)->index_text((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->index_text((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text__SWIG_2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->index_text((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,index_text) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_TermGenerator_index_text__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_TermGenerator_index_text__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_TermGenerator_index_text__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'TermGenerator_index_text'", 0);
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[2]);
  temp4.assign(Z_STRVAL(args[2]), Z_STRLEN(args[2]));
  arg4 = &temp4;
  
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,index_text_without_positions) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_TermGenerator_index_text_without_positions__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_TermGenerator_index_text_without_positions__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_TermGenerator_index_text_without_positions__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'TermGenerator_index_text_without_positions'", 0);
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_TermGenerator_increase_termpos__SWIG_0) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termpos arg2 ;
  zval args[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termpos) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->increase_termpos(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_TermGenerator_increase_termpos__SWIG_1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->increase_termpos();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,increase_termpos) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_TermGenerator_increase_termpos__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_TermGenerator_increase_termpos__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'TermGenerator_increase_termpos'", 0);
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,get_termpos) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termpos result;
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termpos)((Xapian::TermGenerator const *)arg1)->get_termpos();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,set_termpos) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termpos arg2 ;
  zval args[1];
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termpos) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_termpos(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianTermGenerator,get_description) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::TermGenerator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::TermGenerator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianTermGenerator,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianTermGenerator,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianTermGenerator,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianMSet,__construct) {
  Xapian::MSet *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::MSet *)new Xapian::MSet();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__MSet, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_MSet_convert_to_percent__SWIG_0) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  double arg2 ;
  zval args[1];
  int result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (int)((Xapian::MSet const *)arg1)->convert_to_percent(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_MSet_convert_to_percent__SWIG_1) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval args[1];
  int result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 2 of MSet_convert_to_percent");
    return;
  }
  
  {
    try {
      result = (int)((Xapian::MSet const *)arg1)->convert_to_percent((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,convert_to_percent) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _wrap_MSet_convert_to_percent__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _wrap_MSet_convert_to_percent__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'MSet_convert_to_percent'", 0);
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_termfreq) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_termfreq((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_termweight) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  double result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = (double)((Xapian::MSet const *)arg1)->get_termweight((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_firstitem) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_firstitem();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_matches_lower_bound) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_lower_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_matches_estimated) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_estimated();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_matches_upper_bound) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_upper_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_uncollapsed_matches_lower_bound) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_lower_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_uncollapsed_matches_estimated) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_estimated();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_uncollapsed_matches_upper_bound) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_upper_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_max_attained) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  double result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::MSet const *)arg1)->get_max_attained();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_max_possible) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  double result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::MSet const *)arg1)->get_max_possible();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static 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[7];
  std::string result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 7 || zend_get_parameters_array_ex(7, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (size_t) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg4 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Stem for argument 4 of MSet_snippet");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg5 = (unsigned int) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[4]);
  temp6.assign(Z_STRVAL(args[4]), Z_STRLEN(args[4]));
  arg6 = &temp6;
  
  
  convert_to_string(&args[5]);
  temp7.assign(Z_STRVAL(args[5]), Z_STRLEN(args[5]));
  arg7 = &temp7;
  
  
  convert_to_string(&args[6]);
  temp8.assign(Z_STRVAL(args[6]), Z_STRLEN(args[6]));
  arg8 = &temp8;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6,(std::string const &)*arg7,(std::string const &)*arg8);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static 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[6];
  std::string result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (size_t) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg4 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Stem for argument 4 of MSet_snippet");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg5 = (unsigned int) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[4]);
  temp6.assign(Z_STRVAL(args[4]), Z_STRLEN(args[4]));
  arg6 = &temp6;
  
  
  convert_to_string(&args[5]);
  temp7.assign(Z_STRVAL(args[5]), Z_STRLEN(args[5]));
  arg7 = &temp7;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6,(std::string const &)*arg7);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static 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[5];
  std::string result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (size_t) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg4 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Stem for argument 4 of MSet_snippet");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg5 = (unsigned int) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[4]);
  temp6.assign(Z_STRVAL(args[4]), Z_STRLEN(args[4]));
  arg6 = &temp6;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static 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[4];
  std::string result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (size_t) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg4 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Stem for argument 4 of MSet_snippet");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg5 = (unsigned int) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(Xapian::Stem const &)*arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static 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[3];
  std::string result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (size_t) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg4 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Stem for argument 4 of MSet_snippet");
    return;
  }
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(Xapian::Stem const &)*arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static 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[2];
  std::string result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (size_t) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_MSet_snippet__SWIG_6) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  std::string result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,snippet) {
  int argc;
  zval argv[7];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_MSet_snippet__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        ((size_t)-1 >= ZEND_LONG_MAX || (zend_long)(size_t)-1 >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_MSet_snippet__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        ((size_t)-1 >= ZEND_LONG_MAX || (zend_long)(size_t)-1 >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _wrap_MSet_snippet__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        ((size_t)-1 >= ZEND_LONG_MAX || (zend_long)(size_t)-1 >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[3])) &&
            (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            _wrap_MSet_snippet__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        ((size_t)-1 >= ZEND_LONG_MAX || (zend_long)(size_t)-1 >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[3])) &&
            (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            {
              _v = (Z_TYPE(argv[4]) == IS_STRING);
            }
            if (_v) {
              _wrap_MSet_snippet__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        ((size_t)-1 >= ZEND_LONG_MAX || (zend_long)(size_t)-1 >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[3])) &&
            (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            {
              _v = (Z_TYPE(argv[4]) == IS_STRING);
            }
            if (_v) {
              {
                _v = (Z_TYPE(argv[5]) == IS_STRING);
              }
              if (_v) {
                _wrap_MSet_snippet__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        ((size_t)-1 >= ZEND_LONG_MAX || (zend_long)(size_t)-1 >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[3])) &&
            (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            {
              _v = (Z_TYPE(argv[4]) == IS_STRING);
            }
            if (_v) {
              {
                _v = (Z_TYPE(argv[5]) == IS_STRING);
              }
              if (_v) {
                {
                  _v = (Z_TYPE(argv[6]) == IS_STRING);
                }
                if (_v) {
                  _wrap_MSet_snippet__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
                }
              }
            }
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'MSet_snippet'", 0);
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_MSet_fetch__SWIG_0) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  Xapian::MSetIterator *arg3 = 0 ;
  zval args[2];
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 2 of MSet_fetch");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 3 of MSet_fetch");
    return;
  }
  
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch((Xapian::MSetIterator const &)*arg2,(Xapian::MSetIterator const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_MSet_fetch__SWIG_1) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 2 of MSet_fetch");
    return;
  }
  
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_MSet_fetch__SWIG_2) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,fetch) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_MSet_fetch__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _wrap_MSet_fetch__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _wrap_MSet_fetch__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'MSet_fetch'", 0);
fail:
  return;
}


static PHP_METHOD(XapianMSet,size) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->size();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,is_empty) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  bool result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (bool)((Xapian::MSet const *)arg1)->empty();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,begin) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSetIterator * resultobj = new Xapian::MSetIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSetIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianMSet,end) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->end();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSetIterator * resultobj = new Xapian::MSetIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSetIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianMSet,back) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->back();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSetIterator * resultobj = new Xapian::MSetIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSetIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_description) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::MSet const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_docid) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  zval args[1];
  Xapian::docid result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::docid)Xapian_MSet_get_docid((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_document) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  zval args[1];
  Xapian::Document result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian_MSet_get_document((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Document * resultobj = new Xapian::Document(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Document, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_hit) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  zval args[1];
  Xapian::MSetIterator result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian_MSet_get_hit((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSetIterator * resultobj = new Xapian::MSetIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSetIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianMSet,get_document_percentage) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  zval args[1];
  int result;
  
  arg1 = (Xapian::MSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (int)Xapian_MSet_get_document_percentage((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}




PHP_METHOD(XapianMSet,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianMSet,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianMSet,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianMSetIterator,mset_set) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSet *arg2 = (Xapian::MSet *) 0 ;
  zval args[1];
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSet, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSet for argument 2 of MSetIterator_mset_set");
    return;
  }
  
  if (arg1) (arg1)->mset = *arg2;
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,mset_get) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSet *result = 0 ;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::MSet *)& ((arg1)->mset);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MSet, 0);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,off_from_end_set) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSet::size_type arg2 ;
  zval args[1];
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::MSet::size_type) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  if (arg1) (arg1)->off_from_end = arg2;
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,off_from_end_get) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSet::size_type result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::MSet::size_type) ((arg1)->off_from_end);
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,__construct) {
  Xapian::MSetIterator *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::MSetIterator *)new Xapian::MSetIterator();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__MSetIterator, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,get_rank) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_rank();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,get_document) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::Document result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_document();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Document * resultobj = new Xapian::Document(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Document, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,get_weight) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  double result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::MSetIterator const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,get_collapse_key) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_collapse_key();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,get_collapse_count) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_collapse_count();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,get_sort_key) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_sort_key();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,get_percent) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  int result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (int)((Xapian::MSetIterator const *)arg1)->get_percent();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,get_description) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,key) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSetIterator *result = 0 ;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::MSetIterator *) &Xapian_MSetIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MSetIterator, 0);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,current) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::docid)Xapian_MSetIterator_current(arg1);
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,valid) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  bool result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (bool)Xapian_MSetIterator_valid(arg1);
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,rewind) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  Xapian_MSetIterator_rewind(arg1);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,equals) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 2 of MSetIterator_equals");
    return;
  }
  
  {
    try {
      result = (bool)Xapian_MSetIterator_equals((Xapian::MSetIterator const *)arg1,(Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,get_docid) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::docid)Xapian_MSetIterator_get_docid((Xapian::MSetIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,next) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      Xapian_MSetIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianMSetIterator,prev) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  
  arg1 = (Xapian::MSetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      Xapian_MSetIterator_prev(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}




PHP_METHOD(XapianMSetIterator,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"mset") == 0) {
    ZVAL_STRING(&tempZval, "mset_set");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,1,&args[1]);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"off_from_end") == 0) {
    ZVAL_STRING(&tempZval, "off_from_end_set");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,1,&args[1]);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianMSetIterator,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"mset") == 0) {
    ZVAL_STRING(&tempZval, "mset_get");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,0,NULL);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"off_from_end") == 0) {
    ZVAL_STRING(&tempZval, "off_from_end_get");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,0,NULL);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianMSetIterator,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  
  else if (strcmp(ZSTR_VAL(arg2),"mset") == 0) {
    RETVAL_TRUE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"off_from_end") == 0) {
    RETVAL_TRUE;
  }
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianESet,__construct) {
  Xapian::ESet *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::ESet *)new Xapian::ESet();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ESet, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianESet,size) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::ESet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::ESet const *)arg1)->size();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianESet,is_empty) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  bool result;
  
  arg1 = (Xapian::ESet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (bool)((Xapian::ESet const *)arg1)->empty();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianESet,get_ebound) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::ESet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termcount)((Xapian::ESet const *)arg1)->get_ebound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianESet,begin) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  Xapian::ESetIterator result;
  
  arg1 = (Xapian::ESet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ESet const *)arg1)->begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESetIterator * resultobj = new Xapian::ESetIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESetIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianESet,end) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  Xapian::ESetIterator result;
  
  arg1 = (Xapian::ESet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ESet const *)arg1)->end();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESetIterator * resultobj = new Xapian::ESetIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESetIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianESet,back) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  Xapian::ESetIterator result;
  
  arg1 = (Xapian::ESet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ESet const *)arg1)->back();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESetIterator * resultobj = new Xapian::ESetIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESetIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianESet,get_description) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ESet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ESet const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianESet,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianESet,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianESet,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianESetIterator,eset_set) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESet *arg2 = (Xapian::ESet *) 0 ;
  zval args[1];
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__ESet, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ESet for argument 2 of ESetIterator_eset_set");
    return;
  }
  
  if (arg1) (arg1)->eset = *arg2;
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,eset_get) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESet *result = 0 ;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::ESet *)& ((arg1)->eset);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ESet, 0);
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,off_from_end_set) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESet::size_type arg2 ;
  zval args[1];
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::ESet::size_type) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  if (arg1) (arg1)->off_from_end = arg2;
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,off_from_end_get) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESet::size_type result;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::ESet::size_type) ((arg1)->off_from_end);
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,__construct) {
  Xapian::ESetIterator *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::ESetIterator *)new Xapian::ESetIterator();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ESetIterator, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,get_weight) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  double result;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::ESetIterator const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,get_description) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ESetIterator const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,key) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESetIterator *result = 0 ;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (Xapian::ESetIterator *) &Xapian_ESetIterator_key(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ESetIterator, 0);
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,current) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = Xapian_ESetIterator_current(arg1);
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,valid) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  bool result;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (bool)Xapian_ESetIterator_valid(arg1);
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,rewind) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  Xapian_ESetIterator_rewind(arg1);
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,equals) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESetIterator *arg2 = 0 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__ESetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ESetIterator for argument 2 of ESetIterator_equals");
    return;
  }
  
  {
    try {
      result = (bool)Xapian_ESetIterator_equals((Xapian::ESetIterator const *)arg1,(Xapian::ESetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,get_term) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = Xapian_ESetIterator_get_term((Xapian::ESetIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,next) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      Xapian_ESetIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianESetIterator,prev) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  
  arg1 = (Xapian::ESetIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      Xapian_ESetIterator_prev(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}




PHP_METHOD(XapianESetIterator,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"eset") == 0) {
    ZVAL_STRING(&tempZval, "eset_set");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,1,&args[1]);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"off_from_end") == 0) {
    ZVAL_STRING(&tempZval, "off_from_end_set");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,1,&args[1]);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianESetIterator,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"eset") == 0) {
    ZVAL_STRING(&tempZval, "eset_get");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,0,NULL);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"off_from_end") == 0) {
    ZVAL_STRING(&tempZval, "off_from_end_get");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,0,NULL);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianESetIterator,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  
  else if (strcmp(ZSTR_VAL(arg2),"eset") == 0) {
    RETVAL_TRUE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"off_from_end") == 0) {
    RETVAL_TRUE;
  }
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianRSet,__construct) {
  Xapian::RSet *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::RSet *)new Xapian::RSet();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__RSet, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianRSet,size) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::RSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::RSet const *)arg1)->size();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianRSet,is_empty) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  bool result;
  
  arg1 = (Xapian::RSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (bool)((Xapian::RSet const *)arg1)->empty();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_RSet_add_document__SWIG_0) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  
  arg1 = (Xapian::RSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_document(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_RSet_add_document__SWIG_1) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::RSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 2 of RSet_add_document");
    return;
  }
  
  {
    try {
      (arg1)->add_document((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianRSet,add_document) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _wrap_RSet_add_document__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_RSet_add_document__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'RSet_add_document'", 0);
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_RSet_remove_document__SWIG_0) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  
  arg1 = (Xapian::RSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->remove_document(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_RSet_remove_document__SWIG_1) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::RSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 2 of RSet_remove_document");
    return;
  }
  
  {
    try {
      (arg1)->remove_document((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianRSet,remove_document) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _wrap_RSet_remove_document__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_RSet_remove_document__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'RSet_remove_document'", 0);
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_RSet_contains__SWIG_0) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::RSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (bool)((Xapian::RSet const *)arg1)->contains(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_RSet_contains__SWIG_1) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::RSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 2 of RSet_contains");
    return;
  }
  
  {
    try {
      result = (bool)((Xapian::RSet const *)arg1)->contains((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianRSet,contains) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _wrap_RSet_contains__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_RSet_contains__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'RSet_contains'", 0);
fail:
  return;
}


static PHP_METHOD(XapianRSet,get_description) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  std::string result;
  
  arg1 = (Xapian::RSet *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::RSet const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianRSet,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianRSet,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianRSet,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianMatchDecider,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::MatchDecider *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_MatchDecider) {
        /* not subclassed */
        zend_throw_exception(zend_ce_type_error, "accessing abstract class or protected constructor", 0);
        return;
      } else {
        result = (Xapian::MatchDecider *)new SwigDirector_MatchDecider(arg0);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__MatchDecider, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianMatchDecider,apply) {
  Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  arg1 = (Xapian::MatchDecider *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 2 of MatchDecider_apply");
    return;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::MatchDecider::operator ()");
      } else {
        result = (bool)((Xapian::MatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}




PHP_METHOD(XapianMatchDecider,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::MatchDecider*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianMatchDecider,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianMatchDecider,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianEnquire,__construct) {
  Xapian::Database *arg1 = 0 ;
  zval args[1];
  Xapian::Enquire *result = 0 ;
  
  if(ZEND_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) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Database for argument 1 of new_Enquire");
    return;
  }
  
  {
    try {
      result = (Xapian::Enquire *)new Xapian::Enquire((Xapian::Database const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Enquire, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_set_query__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *arg2 = 0 ;
  Xapian::termcount arg3 ;
  zval args[2];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Query for argument 1 of Enquire_set_query");
    return;
  }
  
  {
    zend_update_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_query", strlen("_query"), &args[0]); 
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_query((Xapian::Query const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_set_query__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Query, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Query for argument 1 of Enquire_set_query");
    return;
  }
  
  {
    zend_update_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_query", strlen("_query"), &args[0]); 
  }
  
  {
    try {
      (arg1)->set_query((Xapian::Query const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_query) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _wrap_Enquire_set_query__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Enquire_set_query__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Enquire_set_query'", 0);
fail:
  return;
}


static PHP_METHOD(XapianEnquire,get_query) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::Query *) &((Xapian::Enquire const *)arg1)->get_query();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  {
    zval* zv = zend_read_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_query", strlen("_query"), false, NULL);
    if (Z_TYPE_P(zv) == IS_OBJECT) {
      RETVAL_OBJ_COPY(Z_OBJ_P(zv));
    } else {
      SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Query, 0);
      
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,add_matchspy) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MatchSpy *arg2 = (Xapian::MatchSpy *) 0 ;
  zval args[1];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MatchSpy, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MatchSpy for argument 1 of Enquire_add_matchspy");
    return;
  }
  
  {
    zval* zv = zend_read_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_spies", strlen("_spies"), false, NULL);
    SEPARATE_ARRAY(zv);
    Z_ADDREF(args[0]);
    add_next_index_zval(zv, &args[0]); 
  }
  
  {
    try {
      (arg1)->add_matchspy(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,clear_matchspies) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->clear_matchspies();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  {
    zval z; ZVAL_EMPTY_ARRAY(&z); zend_update_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_spies", strlen("_spies"), &z); 
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_weighting_scheme) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Weight *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Weight, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Weight for argument 2 of Enquire_set_weighting_scheme");
    return;
  }
  
  {
    try {
      (arg1)->set_weighting_scheme((Xapian::Weight const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      ((Xapian::Enquire const *)arg1)->set_expansion_scheme((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[1];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      ((Xapian::Enquire const *)arg1)->set_expansion_scheme((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_expansion_scheme) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Enquire_set_expansion_scheme__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_DOUBLE);
      if (_v) {
        _wrap_Enquire_set_expansion_scheme__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Enquire_set_expansion_scheme'", 0);
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_set_collapse_key__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  Xapian::doccount arg3 ;
  zval args[2];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::doccount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_collapse_key(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_set_collapse_key__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  zval args[1];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_collapse_key(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_collapse_key) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_Enquire_set_collapse_key__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Enquire_set_collapse_key__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Enquire_set_collapse_key'", 0);
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_docid_order) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Enquire::docid_order arg2 ;
  zval args[1];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::Enquire::docid_order) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_docid_order(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_set_cutoff__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  int arg2 ;
  double arg3 ;
  zval args[2];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_cutoff(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_set_cutoff__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  int arg2 ;
  zval args[1];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_cutoff(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_cutoff) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_Enquire_set_cutoff__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_DOUBLE);
      if (_v) {
        _wrap_Enquire_set_cutoff__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Enquire_set_cutoff'", 0);
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_sort_by_relevance) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->set_sort_by_relevance();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  zend_update_property_null(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_sorter", strlen("_sorter"));
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_sort_by_value) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  zval args[2];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  zend_update_property_null(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_sorter", strlen("_sorter"));
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_value(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_sort_by_key) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  zval args[2];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__KeyMaker, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__KeyMaker for argument 1 of Enquire_set_sort_by_key");
    return;
  }
  
  {
    zend_update_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_sorter", strlen("_sorter"), &args[0]); 
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_key(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_sort_by_value_then_relevance) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  zval args[2];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  zend_update_property_null(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_sorter", strlen("_sorter"));
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_value_then_relevance(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_sort_by_key_then_relevance) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  zval args[2];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__KeyMaker, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__KeyMaker for argument 1 of Enquire_set_sort_by_key_then_relevance");
    return;
  }
  
  {
    zend_update_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_sorter", strlen("_sorter"), &args[0]); 
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_key_then_relevance(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_sort_by_relevance_then_value) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  zval args[2];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  zend_update_property_null(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_sorter", strlen("_sorter"));
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_relevance_then_value(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_sort_by_relevance_then_key) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  zval args[2];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__KeyMaker, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__KeyMaker for argument 1 of Enquire_set_sort_by_relevance_then_key");
    return;
  }
  
  {
    zend_update_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_sorter", strlen("_sorter"), &args[0]); 
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_sort_by_relevance_then_key(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,set_time_limit) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  double arg2 ;
  zval args[1];
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_time_limit(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[5];
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::doccount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::doccount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[3], (void **) &arg5, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 5 of Enquire_get_mset");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[4], (void **) &arg6, SWIGTYPE_p_Xapian__MatchDecider, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MatchDecider for argument 6 of Enquire_get_mset");
    return;
  }
  
  {
    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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
fail:
  return;
}


static 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[4];
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::doccount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::doccount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[3], (void **) &arg5, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 5 of Enquire_get_mset");
    return;
  }
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSet * resultobj = new Xapian::MSet(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
fail:
  return;
}


static 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[3];
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::doccount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::doccount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSet * resultobj = new Xapian::MSet(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_get_mset__SWIG_3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  zval args[2];
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::doccount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSet * resultobj = new Xapian::MSet(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
fail:
  return;
}


static 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[4];
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::doccount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 4 of Enquire_get_mset");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[3], (void **) &arg5, SWIGTYPE_p_Xapian__MatchDecider, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MatchDecider for argument 5 of Enquire_get_mset");
    return;
  }
  
  {
    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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
fail:
  return;
}


static 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[3];
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::doccount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_Xapian__RSet, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 4 of Enquire_get_mset");
    return;
  }
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::MSet * resultobj = new Xapian::MSet(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__MSet, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianEnquire,get_mset) {
  int argc;
  zval argv[5];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Enquire_get_mset__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
        }
        if (_v) {
          _wrap_Enquire_get_mset__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_Enquire_get_mset__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
        }
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(&argv[3], (void**)&tmp, SWIGTYPE_p_Xapian__MatchDecider, 0) >= 0);
          }
          if (_v) {
            _wrap_Enquire_get_mset__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(&argv[3], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, 0) >= 0);
          }
          if (_v) {
            _wrap_Enquire_get_mset__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        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_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Enquire_get_mset'", 0);
fail:
  return;
}


static 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[5];
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 3 of Enquire_get_eset");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[3], (void **) &arg5, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ExpandDecider for argument 5 of Enquire_get_eset");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg6 = (double) zval_get_double(&args[4]);
  /*@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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
fail:
  return;
}


static 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[4];
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 3 of Enquire_get_eset");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[3], (void **) &arg5, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ExpandDecider for argument 5 of Enquire_get_eset");
    return;
  }
  
  {
    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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
fail:
  return;
}


static 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[3];
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 3 of Enquire_get_eset");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESet * resultobj = new Xapian::ESet(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset__SWIG_3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  zval args[2];
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 3 of Enquire_get_eset");
    return;
  }
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ESet * resultobj = new Xapian::ESet(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
fail:
  return;
}


static 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[3];
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 3 of Enquire_get_eset");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ExpandDecider for argument 4 of Enquire_get_eset");
    return;
  }
  
  {
    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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
fail:
  return;
}


static 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[6];
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 3 of Enquire_get_eset");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg5 = (double) zval_get_double(&args[3]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[4], (void **) &arg6, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ExpandDecider for argument 6 of Enquire_get_eset");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg7 = (double) zval_get_double(&args[5]);
  /*@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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
fail:
  return;
}


static 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[5];
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 3 of Enquire_get_eset");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg5 = (double) zval_get_double(&args[3]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[4], (void **) &arg6, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ExpandDecider for argument 6 of Enquire_get_eset");
    return;
  }
  
  {
    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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
fail:
  return;
}


static 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[4];
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__RSet, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RSet for argument 3 of Enquire_get_eset");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg5 = (double) zval_get_double(&args[3]);
  /*@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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ESet, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianEnquire,get_eset) {
  int argc;
  zval argv[6];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _wrap_Enquire_get_eset__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__ExpandDecider, 0) >= 0);
        }
        if (_v) {
          _wrap_Enquire_get_eset__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_Enquire_get_eset__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(&argv[3], (void**)&tmp, SWIGTYPE_p_Xapian__ExpandDecider, 0) >= 0);
          }
          if (_v) {
            _wrap_Enquire_get_eset__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _wrap_Enquire_get_eset__SWIG_7(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(&argv[3], (void**)&tmp, SWIGTYPE_p_Xapian__ExpandDecider, 0) >= 0);
          }
          if (_v) {
            _v = (Z_TYPE(argv[4]) == IS_DOUBLE);
            if (_v) {
              _wrap_Enquire_get_eset__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            {
              void *tmp;
              _v = (SWIG_ConvertPtr(&argv[4], (void**)&tmp, SWIGTYPE_p_Xapian__ExpandDecider, 0) >= 0);
            }
            if (_v) {
              _wrap_Enquire_get_eset__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            {
              void *tmp;
              _v = (SWIG_ConvertPtr(&argv[4], (void**)&tmp, SWIGTYPE_p_Xapian__ExpandDecider, 0) >= 0);
            }
            if (_v) {
              _v = (Z_TYPE(argv[5]) == IS_DOUBLE);
              if (_v) {
                _wrap_Enquire_get_eset__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
              }
            }
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Enquire_get_eset'", 0);
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_begin__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_end__SWIG_0) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end(arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_begin__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 2 of Enquire_get_matching_terms_begin");
    return;
  }
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianEnquire,get_matching_terms_begin) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _wrap_Enquire_get_matching_terms_begin__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_Enquire_get_matching_terms_begin__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Enquire_get_matching_terms_begin'", 0);
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_end__SWIG_1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 2 of Enquire_get_matching_terms_end");
    return;
  }
  
  result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end((Xapian::MSetIterator const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianEnquire,get_matching_terms_end) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _wrap_Enquire_get_matching_terms_end__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_Enquire_get_matching_terms_end__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Enquire_get_matching_terms_end'", 0);
fail:
  return;
}


static PHP_METHOD(XapianEnquire,get_description) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianEnquire,get_matching_terms) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  zval args[1];
  std::pair< Xapian::TermIterator,Xapian::TermIterator > result;
  
  arg1 = (Xapian::Enquire *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__MSetIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__MSetIterator for argument 2 of Enquire_get_matching_terms");
    return;
  }
  
  {
    try {
      result = Xapian_Enquire_get_matching_terms((Xapian::Enquire const *)arg1,(Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    array_init(return_value);
    
    for (Xapian::TermIterator i = (&result)->first; i != (&result)->second; ++i) {
      const string& term = *i;
      add_next_index_stringl(return_value, term.data(), term.length());
    }
  }
fail:
  return;
}




PHP_METHOD(XapianEnquire,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianEnquire,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianEnquire,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianExpandDecider,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::ExpandDecider *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_ExpandDecider) {
        /* not subclassed */
        zend_throw_exception(zend_ce_type_error, "accessing abstract class or protected constructor", 0);
        return;
      } else {
        result = (Xapian::ExpandDecider *)new SwigDirector_ExpandDecider(arg0);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ExpandDecider, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianExpandDecider,apply) {
  Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  arg1 = (Xapian::ExpandDecider *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::ExpandDecider::operator ()");
      } else {
        result = (bool)((Xapian::ExpandDecider const *)arg1)->operator ()((std::string const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianExpandDecider,release) {
  Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
  Xapian::ExpandDecider *result = 0 ;
  
  arg1 = (Xapian::ExpandDecider *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::ExpandDecider *)((Xapian::ExpandDecider const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ExpandDecider, 0);
  
fail:
  return;
}




PHP_METHOD(XapianExpandDecider,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::ExpandDecider*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianExpandDecider,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianExpandDecider,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianExpandDeciderAnd,__construct) {
  Xapian::ExpandDecider *arg1 = 0 ;
  Xapian::ExpandDecider *arg2 = 0 ;
  zval args[2];
  Xapian::ExpandDeciderAnd *result = 0 ;
  
  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) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ExpandDecider for argument 1 of new_ExpandDeciderAnd");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__ExpandDecider, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ExpandDecider for argument 2 of new_ExpandDeciderAnd");
    return;
  }
  
  {
    try {
      result = (Xapian::ExpandDeciderAnd *)new Xapian::ExpandDeciderAnd((Xapian::ExpandDecider const &)*arg1,(Xapian::ExpandDecider const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ExpandDeciderAnd, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianExpandDeciderAnd,apply) {
  Xapian::ExpandDeciderAnd *arg1 = (Xapian::ExpandDeciderAnd *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::ExpandDeciderAnd *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = (bool)((Xapian::ExpandDeciderAnd const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}




PHP_METHOD(XapianExpandDeciderAnd,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianExpandDecider___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianExpandDeciderAnd,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianExpandDecider___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianExpandDeciderAnd,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianExpandDecider___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianExpandDeciderFilterPrefix,__construct) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  Xapian::ExpandDeciderFilterPrefix *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::ExpandDeciderFilterPrefix *)new Xapian::ExpandDeciderFilterPrefix((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianExpandDeciderFilterPrefix,apply) {
  Xapian::ExpandDeciderFilterPrefix *arg1 = (Xapian::ExpandDeciderFilterPrefix *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::ExpandDeciderFilterPrefix *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = (bool)((Xapian::ExpandDeciderFilterPrefix const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}




PHP_METHOD(XapianExpandDeciderFilterPrefix,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianExpandDecider___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianExpandDeciderFilterPrefix,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianExpandDecider___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianExpandDeciderFilterPrefix,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianExpandDecider___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianKeyMaker,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::KeyMaker *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_KeyMaker) {
        /* not subclassed */
        zend_throw_exception(zend_ce_type_error, "accessing abstract class or protected constructor", 0);
        return;
      } else {
        result = (Xapian::KeyMaker *)new SwigDirector_KeyMaker(arg0);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__KeyMaker, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianKeyMaker,apply) {
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::KeyMaker *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 2 of KeyMaker_apply");
    return;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::KeyMaker::operator ()");
      } else {
        result = ((Xapian::KeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianKeyMaker,release) {
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  Xapian::KeyMaker *result = 0 ;
  
  arg1 = (Xapian::KeyMaker *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::KeyMaker *)((Xapian::KeyMaker const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__KeyMaker, 0);
  
fail:
  return;
}




PHP_METHOD(XapianKeyMaker,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::KeyMaker*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianKeyMaker,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianKeyMaker,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianMultiValueKeyMaker,__construct) {
  Xapian::MultiValueKeyMaker *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::MultiValueKeyMaker *)new Xapian::MultiValueKeyMaker();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianMultiValueKeyMaker,apply) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval args[1];
  std::string result;
  
  arg1 = (Xapian::MultiValueKeyMaker *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 2 of MultiValueKeyMaker_apply");
    return;
  }
  
  {
    try {
      result = ((Xapian::MultiValueKeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::MultiValueKeyMaker *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[2]);
  temp4.assign(Z_STRVAL(args[2]), Z_STRLEN(args[2]));
  arg4 = &temp4;
  
  {
    try {
      (arg1)->add_value(arg2,arg3,(std::string const &)*arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_MultiValueKeyMaker_add_value__SWIG_1) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  zval args[2];
  
  arg1 = (Xapian::MultiValueKeyMaker *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_value(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_MultiValueKeyMaker_add_value__SWIG_2) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::valueno arg2 ;
  zval args[1];
  
  arg1 = (Xapian::MultiValueKeyMaker *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_value(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianMultiValueKeyMaker,add_value) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_MultiValueKeyMaker_add_value__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_TRUE || Z_TYPE(argv[1]) == IS_FALSE || Z_TYPE(argv[1]) == IS_LONG);
      }
      if (_v) {
        _wrap_MultiValueKeyMaker_add_value__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_TRUE || Z_TYPE(argv[1]) == IS_FALSE || Z_TYPE(argv[1]) == IS_LONG);
      }
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_MultiValueKeyMaker_add_value__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'MultiValueKeyMaker_add_value'", 0);
fail:
  return;
}




PHP_METHOD(XapianMultiValueKeyMaker,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianKeyMaker___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianMultiValueKeyMaker,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianKeyMaker___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianMultiValueKeyMaker,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianKeyMaker___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianStopper,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::Stopper *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_Stopper) {
        /* not subclassed */
        zend_throw_exception(zend_ce_type_error, "accessing abstract class or protected constructor", 0);
        return;
      } else {
        result = (Xapian::Stopper *)new SwigDirector_Stopper(arg0);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Stopper, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianStopper,apply) {
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  arg1 = (Xapian::Stopper *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::Stopper::operator ()");
      } else {
        result = (bool)((Xapian::Stopper const *)arg1)->operator ()((std::string const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianStopper,get_description) {
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::Stopper *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianStopper,release) {
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  Xapian::Stopper *result = 0 ;
  
  arg1 = (Xapian::Stopper *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::Stopper *)((Xapian::Stopper const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__Stopper, 0);
  
fail:
  return;
}




PHP_METHOD(XapianStopper,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::Stopper*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianStopper,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianStopper,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




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


static PHP_METHOD(XapianSimpleStopper,add) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::SimpleStopper *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->add((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianSimpleStopper,apply) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::SimpleStopper *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = (bool)((Xapian::SimpleStopper const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianSimpleStopper,get_description) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string result;
  
  arg1 = (Xapian::SimpleStopper *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::SimpleStopper const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_SimpleStopper__SWIG_1) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  Xapian::SimpleStopper *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::SimpleStopper *)new_Xapian_SimpleStopper__SWIG_1((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__SimpleStopper, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianSimpleStopper,__construct) {
  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 = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_SimpleStopper__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_SimpleStopper'", 0);
fail:
  return;
}




PHP_METHOD(XapianSimpleStopper,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianStopper___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianSimpleStopper,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianStopper___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianSimpleStopper,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianStopper___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_RangeProcessor__SWIG_0) {
  zval *arg0 = ZEND_THIS;
  Xapian::RangeProcessor *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_RangeProcessor) {
        /* not subclassed */
        result = new Xapian::RangeProcessor();
      } else {
        result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg0);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__RangeProcessor, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_RangeProcessor__SWIG_1) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  std::string temp2 ;
  zval args[3];
  zval *arg0 = ZEND_THIS;
  Xapian::RangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_RangeProcessor) {
        /* not subclassed */
        result = new Xapian::RangeProcessor(arg1, (std::string const &)*arg2, arg3);
      } else {
        result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg0, arg1, (std::string const &)*arg2, arg3);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__RangeProcessor, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_RangeProcessor__SWIG_2) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[2];
  zval *arg0 = ZEND_THIS;
  Xapian::RangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_RangeProcessor) {
        /* not subclassed */
        result = new Xapian::RangeProcessor(arg1, (std::string const &)*arg2);
      } else {
        result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg0, arg1, (std::string const &)*arg2);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__RangeProcessor, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_RangeProcessor__SWIG_3) {
  Xapian::valueno arg1 ;
  zval args[1];
  zval *arg0 = ZEND_THIS;
  Xapian::RangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_RangeProcessor) {
        /* not subclassed */
        result = new Xapian::RangeProcessor(arg1);
      } else {
        result = (Xapian::RangeProcessor *)new SwigDirector_RangeProcessor(arg0, arg1);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__RangeProcessor, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianRangeProcessor,__construct) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_new_RangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_new_RangeProcessor__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_RangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_new_RangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_RangeProcessor'", 0);
fail:
  return;
}


static PHP_METHOD(XapianRangeProcessor,check_range) {
  Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  Xapian::Query result;
  
  arg1 = (Xapian::RangeProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      result = (arg1)->check_range((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianRangeProcessor,apply) {
  Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::Query result;
  
  arg1 = (Xapian::RangeProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianRangeProcessor,release) {
  Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
  Xapian::RangeProcessor *result = 0 ;
  
  arg1 = (Xapian::RangeProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::RangeProcessor *)((Xapian::RangeProcessor const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__RangeProcessor, 0);
  
fail:
  return;
}




PHP_METHOD(XapianRangeProcessor,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::RangeProcessor*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianRangeProcessor,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianRangeProcessor,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_DateRangeProcessor__SWIG_0) {
  Xapian::valueno arg1 ;
  unsigned int arg2 ;
  int arg3 ;
  zval args[3];
  Xapian::DateRangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_DateRangeProcessor__SWIG_1) {
  Xapian::valueno arg1 ;
  unsigned int arg2 ;
  zval args[2];
  Xapian::DateRangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_DateRangeProcessor__SWIG_2) {
  Xapian::valueno arg1 ;
  zval args[1];
  Xapian::DateRangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateRangeProcessor, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianDateRangeProcessor,__construct) {
  int argc;
  zval argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_new_DateRangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_DateRangeProcessor__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_new_DateRangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_new_DateRangeProcessor__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_new_DateRangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[3])) &&
            (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            _wrap_new_DateRangeProcessor__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_DateRangeProcessor'", 0);
fail:
  return;
}


static PHP_METHOD(XapianDateRangeProcessor,apply) {
  Xapian::DateRangeProcessor *arg1 = (Xapian::DateRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  Xapian::Query result;
  
  arg1 = (Xapian::DateRangeProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
fail:
  return;
}




PHP_METHOD(XapianDateRangeProcessor,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianRangeProcessor___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianDateRangeProcessor,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianRangeProcessor___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianDateRangeProcessor,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianRangeProcessor___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__NumberRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__NumberRangeProcessor, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_NumberRangeProcessor__SWIG_2) {
  Xapian::valueno arg1 ;
  zval args[1];
  Xapian::NumberRangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__NumberRangeProcessor, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianNumberRangeProcessor,__construct) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_new_NumberRangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_NumberRangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_new_NumberRangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_NumberRangeProcessor'", 0);
fail:
  return;
}


static PHP_METHOD(XapianNumberRangeProcessor,apply) {
  Xapian::NumberRangeProcessor *arg1 = (Xapian::NumberRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  Xapian::Query result;
  
  arg1 = (Xapian::NumberRangeProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
fail:
  return;
}




PHP_METHOD(XapianNumberRangeProcessor,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianRangeProcessor___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianNumberRangeProcessor,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianRangeProcessor___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianNumberRangeProcessor,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianRangeProcessor___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianValueRangeProcessor,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::ValueRangeProcessor *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_ValueRangeProcessor) {
        /* not subclassed */
        zend_throw_exception(zend_ce_type_error, "accessing abstract class or protected constructor", 0);
        return;
      } else {
        result = (Xapian::ValueRangeProcessor *)new SwigDirector_ValueRangeProcessor(arg0);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ValueRangeProcessor, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianValueRangeProcessor,apply) {
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::valueno result;
  
  arg1 = (Xapian::ValueRangeProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  {
    zval * p = Z_ISREF(args[0]) ? Z_REFVAL(args[0]) : &args[0];
    convert_to_string(p);
    temp2.assign(Z_STRVAL_P(p), Z_STRLEN_P(p));
    arg2 = &temp2;
  }
  
  
  {
    zval * p = Z_ISREF(args[1]) ? Z_REFVAL(args[1]) : &args[1];
    convert_to_string(p);
    temp3.assign(Z_STRVAL_P(p), Z_STRLEN_P(p));
    arg3 = &temp3;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::ValueRangeProcessor::operator ()");
      } else {
        result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
  
  if (Z_ISREF(args[0])) {
    ZVAL_STRINGL(Z_REFVAL(args[0]), arg2->data(), arg2->size());
  }
  
  
  if (Z_ISREF(args[1])) {
    ZVAL_STRINGL(Z_REFVAL(args[1]), arg3->data(), arg3->size());
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueRangeProcessor,release) {
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  Xapian::ValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::ValueRangeProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::ValueRangeProcessor *)((Xapian::ValueRangeProcessor const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__ValueRangeProcessor, 0);
  
fail:
  return;
}




PHP_METHOD(XapianValueRangeProcessor,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::ValueRangeProcessor*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianValueRangeProcessor,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianValueRangeProcessor,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_StringValueRangeProcessor__SWIG_0) {
  Xapian::valueno arg1 ;
  zval args[1];
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__StringValueRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__StringValueRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__StringValueRangeProcessor, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianStringValueRangeProcessor,__construct) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_new_StringValueRangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_StringValueRangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_TRUE || Z_TYPE(argv[2]) == IS_FALSE || Z_TYPE(argv[2]) == IS_LONG);
        }
        if (_v) {
          _wrap_new_StringValueRangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_StringValueRangeProcessor'", 0);
fail:
  return;
}


static PHP_METHOD(XapianStringValueRangeProcessor,apply) {
  Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  Xapian::valueno result;
  
  arg1 = (Xapian::StringValueRangeProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  {
    zval * p = Z_ISREF(args[0]) ? Z_REFVAL(args[0]) : &args[0];
    convert_to_string(p);
    temp2.assign(Z_STRVAL_P(p), Z_STRLEN_P(p));
    arg2 = &temp2;
  }
  
  
  {
    zval * p = Z_ISREF(args[1]) ? Z_REFVAL(args[1]) : &args[1];
    convert_to_string(p);
    temp3.assign(Z_STRVAL_P(p), Z_STRLEN_P(p));
    arg3 = &temp3;
  }
  
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
  
  if (Z_ISREF(args[0])) {
    ZVAL_STRINGL(Z_REFVAL(args[0]), arg2->data(), arg2->size());
  }
  
  
  if (Z_ISREF(args[1])) {
    ZVAL_STRINGL(Z_REFVAL(args[1]), arg3->data(), arg3->size());
  }
  
fail:
  return;
}




PHP_METHOD(XapianStringValueRangeProcessor,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianValueRangeProcessor___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianStringValueRangeProcessor,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianValueRangeProcessor___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianStringValueRangeProcessor,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianValueRangeProcessor___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor__SWIG_0) {
  Xapian::valueno arg1 ;
  bool arg2 ;
  int arg3 ;
  zval args[3];
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg2 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor__SWIG_1) {
  Xapian::valueno arg1 ;
  bool arg2 ;
  zval args[2];
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg2 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor__SWIG_2) {
  Xapian::valueno arg1 ;
  zval args[1];
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg4 = (bool) zval_is_true(&args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg5 = (int) zval_get_long(&args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg4 = (bool) zval_is_true(&args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DateValueRangeProcessor, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianDateValueRangeProcessor,__construct) {
  int argc;
  zval argv[5];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_new_DateValueRangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_DateValueRangeProcessor__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_TRUE || Z_TYPE(argv[1]) == IS_FALSE || Z_TYPE(argv[1]) == IS_LONG);
      }
      if (_v) {
        _wrap_new_DateValueRangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_TRUE || Z_TYPE(argv[2]) == IS_FALSE || Z_TYPE(argv[2]) == IS_LONG);
        }
        if (_v) {
          _wrap_new_DateValueRangeProcessor__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_TRUE || Z_TYPE(argv[1]) == IS_FALSE || Z_TYPE(argv[1]) == IS_LONG);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_new_DateValueRangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_TRUE || Z_TYPE(argv[2]) == IS_FALSE || Z_TYPE(argv[2]) == IS_LONG);
        }
        if (_v) {
          {
            _v = (Z_TYPE(argv[3]) == IS_TRUE || Z_TYPE(argv[3]) == IS_FALSE || Z_TYPE(argv[3]) == IS_LONG);
          }
          if (_v) {
            _wrap_new_DateValueRangeProcessor__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_TRUE || Z_TYPE(argv[2]) == IS_FALSE || Z_TYPE(argv[2]) == IS_LONG);
        }
        if (_v) {
          {
            _v = (Z_TYPE(argv[3]) == IS_TRUE || Z_TYPE(argv[3]) == IS_FALSE || Z_TYPE(argv[3]) == IS_LONG);
          }
          if (_v) {
            _v = (Z_TYPE(argv[4]) == IS_LONG &&
              (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[4])) &&
              (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[4])));
            
            if (_v) {
              _wrap_new_DateValueRangeProcessor__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_DateValueRangeProcessor'", 0);
fail:
  return;
}


static PHP_METHOD(XapianDateValueRangeProcessor,apply) {
  Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  Xapian::valueno result;
  
  arg1 = (Xapian::DateValueRangeProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  {
    zval * p = Z_ISREF(args[0]) ? Z_REFVAL(args[0]) : &args[0];
    convert_to_string(p);
    temp2.assign(Z_STRVAL_P(p), Z_STRLEN_P(p));
    arg2 = &temp2;
  }
  
  
  {
    zval * p = Z_ISREF(args[1]) ? Z_REFVAL(args[1]) : &args[1];
    convert_to_string(p);
    temp3.assign(Z_STRVAL_P(p), Z_STRLEN_P(p));
    arg3 = &temp3;
  }
  
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
  
  if (Z_ISREF(args[0])) {
    ZVAL_STRINGL(Z_REFVAL(args[0]), arg2->data(), arg2->size());
  }
  
  
  if (Z_ISREF(args[1])) {
    ZVAL_STRINGL(Z_REFVAL(args[1]), arg3->data(), arg3->size());
  }
  
fail:
  return;
}




PHP_METHOD(XapianDateValueRangeProcessor,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianStringValueRangeProcessor___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianDateValueRangeProcessor,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianStringValueRangeProcessor___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianDateValueRangeProcessor,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianStringValueRangeProcessor___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_NumberValueRangeProcessor__SWIG_0) {
  Xapian::valueno arg1 ;
  zval args[1];
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__NumberValueRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg3 = (bool) zval_is_true(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__NumberValueRangeProcessor, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__NumberValueRangeProcessor, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianNumberValueRangeProcessor,__construct) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_new_NumberValueRangeProcessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_new_NumberValueRangeProcessor__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_TRUE || Z_TYPE(argv[2]) == IS_FALSE || Z_TYPE(argv[2]) == IS_LONG);
        }
        if (_v) {
          _wrap_new_NumberValueRangeProcessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_NumberValueRangeProcessor'", 0);
fail:
  return;
}


static PHP_METHOD(XapianNumberValueRangeProcessor,apply) {
  Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  Xapian::valueno result;
  
  arg1 = (Xapian::NumberValueRangeProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  {
    zval * p = Z_ISREF(args[0]) ? Z_REFVAL(args[0]) : &args[0];
    convert_to_string(p);
    temp2.assign(Z_STRVAL_P(p), Z_STRLEN_P(p));
    arg2 = &temp2;
  }
  
  
  {
    zval * p = Z_ISREF(args[1]) ? Z_REFVAL(args[1]) : &args[1];
    convert_to_string(p);
    temp3.assign(Z_STRVAL_P(p), Z_STRLEN_P(p));
    arg3 = &temp3;
  }
  
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
  
  if (Z_ISREF(args[0])) {
    ZVAL_STRINGL(Z_REFVAL(args[0]), arg2->data(), arg2->size());
  }
  
  
  if (Z_ISREF(args[1])) {
    ZVAL_STRINGL(Z_REFVAL(args[1]), arg3->data(), arg3->size());
  }
  
fail:
  return;
}




PHP_METHOD(XapianNumberValueRangeProcessor,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianStringValueRangeProcessor___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianNumberValueRangeProcessor,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianStringValueRangeProcessor___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianNumberValueRangeProcessor,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianStringValueRangeProcessor___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianFieldProcessor,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::FieldProcessor *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_FieldProcessor) {
        /* not subclassed */
        zend_throw_exception(zend_ce_type_error, "accessing abstract class or protected constructor", 0);
        return;
      } else {
        result = (Xapian::FieldProcessor *)new SwigDirector_FieldProcessor(arg0);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__FieldProcessor, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianFieldProcessor,apply) {
  Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::Query result;
  
  arg1 = (Xapian::FieldProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::FieldProcessor::operator ()");
      } else {
        result = (arg1)->operator ()((std::string const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianFieldProcessor,release) {
  Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
  Xapian::FieldProcessor *result = 0 ;
  
  arg1 = (Xapian::FieldProcessor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::FieldProcessor *)((Xapian::FieldProcessor const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__FieldProcessor, 0);
  
fail:
  return;
}




PHP_METHOD(XapianFieldProcessor,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::FieldProcessor*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianFieldProcessor,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianFieldProcessor,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianQueryParser,__construct) {
  Xapian::QueryParser *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::QueryParser *)new Xapian::QueryParser();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__QueryParser, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,set_stemmer) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Stem *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Stem, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Stem for argument 2 of QueryParser_set_stemmer");
    return;
  }
  
  {
    try {
      (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,set_stemming_strategy) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::QueryParser::stem_strategy arg2 ;
  zval args[1];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::QueryParser::stem_strategy) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_stemming_strategy(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_stopper__SWIG_0) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
  zval args[1];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Stopper, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Stopper for argument 1 of QueryParser_set_stopper");
    return;
  }
  
  {
    zend_update_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_stopper", strlen("_stopper"), &args[0]); 
  }
  
  {
    try {
      (arg1)->set_stopper((Xapian::Stopper const *)arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_stopper__SWIG_1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->set_stopper();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,set_stopper) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_QueryParser_set_stopper__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__Stopper, 0) >= 0);
    }
    if (_v) {
      _wrap_QueryParser_set_stopper__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'QueryParser_set_stopper'", 0);
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,set_default_op) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Query::op arg2 ;
  zval args[1];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::Query::op) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_default_op(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,get_default_op) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Query::op result;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::Query::op)((Xapian::QueryParser const *)arg1)->get_default_op();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,set_database) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Database for argument 2 of QueryParser_set_database");
    return;
  }
  
  {
    try {
      (arg1)->set_database((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (unsigned int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_max_expansion(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_max_expansion__SWIG_1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::termcount arg2 ;
  int arg3 ;
  zval args[2];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_max_expansion(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_max_expansion__SWIG_2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::termcount arg2 ;
  zval args[1];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_max_expansion(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,set_max_expansion) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_QueryParser_set_max_expansion__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_QueryParser_set_max_expansion__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_QueryParser_set_max_expansion__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'QueryParser_set_max_expansion'", 0);
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,set_max_wildcard_expansion) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::termcount arg2 ;
  zval args[1];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_max_wildcard_expansion(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[3];
  Xapian::Query result;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[2]);
  temp4.assign(Z_STRVAL(args[2]), Z_STRLEN(args[2]));
  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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
fail:
  return;
}


static 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[2];
  Xapian::Query result;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_QueryParser_parse_query__SWIG_2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::Query result;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Query * resultobj = new Xapian::Query(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Query, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,parse_query) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_QueryParser_parse_query__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_QueryParser_parse_query__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_STRING);
        }
        if (_v) {
          _wrap_QueryParser_parse_query__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'QueryParser_parse_query'", 0);
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      (arg1)->add_prefix((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__FieldProcessor, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__FieldProcessor for argument 1 of QueryParser_add_prefix");
    return;
  }
  
  {
    zval* zv = zend_read_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_procs", strlen("_procs"), false, NULL);
    SEPARATE_ARRAY(zv);
    Z_ADDREF(args[1]);
    add_next_index_zval(zv, &args[1]); 
  }
  
  {
    try {
      (arg1)->add_prefix((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,add_prefix) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__FieldProcessor, 0) >= 0);
      }
      if (_v) {
        _wrap_QueryParser_add_prefix__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_QueryParser_add_prefix__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'QueryParser_add_prefix'", 0);
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_std__string, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_std__string for argument 4 of QueryParser_add_boolean_prefix");
    return;
  }
  
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,(std::string const *)arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg4 = (bool) zval_is_true(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__FieldProcessor, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__FieldProcessor for argument 1 of QueryParser_add_boolean_prefix");
    return;
  }
  
  {
    zval* zv = zend_read_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_procs", strlen("_procs"), false, NULL);
    SEPARATE_ARRAY(zv);
    Z_ADDREF(args[1]);
    add_next_index_zval(zv, &args[1]); 
  }
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_std__string, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_std__string for argument 4 of QueryParser_add_boolean_prefix");
    return;
  }
  
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3,(std::string const *)arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__FieldProcessor, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__FieldProcessor for argument 1 of QueryParser_add_boolean_prefix");
    return;
  }
  
  {
    zval* zv = zend_read_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_procs", strlen("_procs"), false, NULL);
    SEPARATE_ARRAY(zv);
    Z_ADDREF(args[1]);
    add_next_index_zval(zv, &args[1]); 
  }
  
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__FieldProcessor, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__FieldProcessor for argument 1 of QueryParser_add_boolean_prefix");
    return;
  }
  
  {
    zval* zv = zend_read_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_procs", strlen("_procs"), false, NULL);
    SEPARATE_ARRAY(zv);
    Z_ADDREF(args[1]);
    add_next_index_zval(zv, &args[1]); 
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg4 = (bool) zval_is_true(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,add_boolean_prefix) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__FieldProcessor, 0) >= 0);
      }
      if (_v) {
        _wrap_QueryParser_add_boolean_prefix__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_QueryParser_add_boolean_prefix__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__FieldProcessor, 0) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_std__string, 0) >= 0);
        }
        if (_v) {
          _wrap_QueryParser_add_boolean_prefix__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__FieldProcessor, 0) >= 0);
      }
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_TRUE || Z_TYPE(argv[2]) == IS_FALSE || Z_TYPE(argv[2]) == IS_LONG);
        }
        if (_v) {
          _wrap_QueryParser_add_boolean_prefix__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_std__string, 0) >= 0);
        }
        if (_v) {
          _wrap_QueryParser_add_boolean_prefix__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        {
          _v = (Z_TYPE(argv[2]) == IS_TRUE || Z_TYPE(argv[2]) == IS_FALSE || Z_TYPE(argv[2]) == IS_LONG);
        }
        if (_v) {
          _wrap_QueryParser_add_boolean_prefix__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'QueryParser_add_boolean_prefix'", 0);
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,stoplist_begin) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->stoplist_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,stoplist_end) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::QueryParser const *)arg1)->stoplist_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,unstem_begin) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->unstem_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,unstem_end) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  result = ((Xapian::QueryParser const *)arg1)->unstem_end((std::string const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__RangeProcessor, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RangeProcessor for argument 1 of QueryParser_add_rangeprocessor");
    return;
  }
  
  {
    zval* zv = zend_read_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_procs", strlen("_procs"), false, NULL);
    SEPARATE_ARRAY(zv);
    Z_ADDREF(args[0]);
    add_next_index_zval(zv, &args[0]); 
  }
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_std__string, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_std__string for argument 3 of QueryParser_add_rangeprocessor");
    return;
  }
  
  {
    try {
      (arg1)->add_rangeprocessor(arg2,(std::string const *)arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_rangeprocessor__SWIG_1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::RangeProcessor *arg2 = (Xapian::RangeProcessor *) 0 ;
  zval args[1];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__RangeProcessor, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__RangeProcessor for argument 1 of QueryParser_add_rangeprocessor");
    return;
  }
  
  {
    zval* zv = zend_read_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_procs", strlen("_procs"), false, NULL);
    SEPARATE_ARRAY(zv);
    Z_ADDREF(args[0]);
    add_next_index_zval(zv, &args[0]); 
  }
  
  {
    try {
      (arg1)->add_rangeprocessor(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,add_rangeprocessor) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__RangeProcessor, 0) >= 0);
    }
    if (_v) {
      _wrap_QueryParser_add_rangeprocessor__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__RangeProcessor, 0) >= 0);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_std__string, 0) >= 0);
      }
      if (_v) {
        _wrap_QueryParser_add_rangeprocessor__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'QueryParser_add_rangeprocessor'", 0);
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,add_valuerangeprocessor) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::ValueRangeProcessor *arg2 = (Xapian::ValueRangeProcessor *) 0 ;
  zval args[1];
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__ValueRangeProcessor, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__ValueRangeProcessor for argument 1 of QueryParser_add_valuerangeprocessor");
    return;
  }
  
  {
    zval* zv = zend_read_property(Z_OBJCE_P(ZEND_THIS), Z_OBJ_P(ZEND_THIS), "_procs", strlen("_procs"), false, NULL);
    SEPARATE_ARRAY(zv);
    Z_ADDREF(args[0]);
    add_next_index_zval(zv, &args[0]); 
  }
  
  {
    try {
      (arg1)->add_valuerangeprocessor(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,get_corrected_query_string) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string result;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->get_corrected_query_string();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianQueryParser,get_description) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string result;
  
  arg1 = (Xapian::QueryParser *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianQueryParser,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianQueryParser,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianQueryParser,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(Xapian,sortable_serialise) {
  PHP_FN(sortable_serialise)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_FUNCTION(sortable_serialise) {
  double arg1 ;
  zval args[1];
  std::string result;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::sortable_serialise(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(Xapian,sortable_unserialise) {
  PHP_FN(sortable_unserialise)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_FUNCTION(sortable_unserialise) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  double result;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (double)Xapian::sortable_unserialise((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValueSetMatchDecider,__construct) {
  Xapian::valueno arg1 ;
  bool arg2 ;
  zval args[2];
  Xapian::ValueSetMatchDecider *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg2 = (bool) zval_is_true(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::ValueSetMatchDecider *)new Xapian::ValueSetMatchDecider(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ValueSetMatchDecider, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianValueSetMatchDecider,add_value) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::ValueSetMatchDecider *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->add_value((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueSetMatchDecider,remove_value) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::ValueSetMatchDecider *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->remove_value((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueSetMatchDecider,apply) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::ValueSetMatchDecider *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 2 of ValueSetMatchDecider_apply");
    return;
  }
  
  {
    try {
      result = (bool)((Xapian::ValueSetMatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}




PHP_METHOD(XapianValueSetMatchDecider,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianMatchDecider___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianValueSetMatchDecider,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianMatchDecider___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianValueSetMatchDecider,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianMatchDecider___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianWeight,name) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianWeight,get_sumpart) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianWeight,get_maxpart) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianWeight,get_sumextra) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianWeight,get_maxextra) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianWeight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianWeight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianWeight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianBoolWeight,__construct) {
  Xapian::BoolWeight *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::BoolWeight *)new Xapian::BoolWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__BoolWeight, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianBoolWeight,name) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::BoolWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::BoolWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianBoolWeight,get_sumpart) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::BoolWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BoolWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBoolWeight,get_maxpart) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::BoolWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::BoolWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBoolWeight,get_sumextra) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::BoolWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BoolWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBoolWeight,get_maxextra) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::BoolWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::BoolWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianBoolWeight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianBoolWeight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianBoolWeight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_TfIdfWeight__SWIG_0) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  Xapian::TfIdfWeight *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::TfIdfWeight *)new Xapian::TfIdfWeight((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__TfIdfWeight, 1);
  
fail:
  return;
}


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


static PHP_METHOD(XapianTfIdfWeight,__construct) {
  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 = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_TfIdfWeight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_TfIdfWeight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianTfIdfWeight,name) {
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::TfIdfWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::TfIdfWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianTfIdfWeight,get_sumpart) {
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::TfIdfWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::TfIdfWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTfIdfWeight,get_maxpart) {
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::TfIdfWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::TfIdfWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTfIdfWeight,get_sumextra) {
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::TfIdfWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::TfIdfWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTfIdfWeight,get_maxextra) {
  Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::TfIdfWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::TfIdfWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianTfIdfWeight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianTfIdfWeight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianTfIdfWeight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg4 = (double) zval_get_double(&args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg5 = (double) zval_get_double(&args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::BM25Weight *)new Xapian::BM25Weight(arg1,arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__BM25Weight, 1);
  
fail:
  return;
}


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


static PHP_METHOD(XapianBM25Weight,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_DOUBLE);
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_DOUBLE);
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _v = (Z_TYPE(argv[4]) == IS_DOUBLE);
            if (_v) {
              _wrap_new_BM25Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_BM25Weight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianBM25Weight,name) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::BM25Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::BM25Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianBM25Weight,get_sumpart) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::BM25Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BM25Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBM25Weight,get_maxpart) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::BM25Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::BM25Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBM25Weight,get_sumextra) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::BM25Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BM25Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBM25Weight,get_maxextra) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::BM25Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::BM25Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianBM25Weight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianBM25Weight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianBM25Weight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg4 = (double) zval_get_double(&args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg5 = (double) zval_get_double(&args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg6 = (double) zval_get_double(&args[5]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::BM25PlusWeight *)new Xapian::BM25PlusWeight(arg1,arg2,arg3,arg4,arg5,arg6);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__BM25PlusWeight, 1);
  
fail:
  return;
}


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


static PHP_METHOD(XapianBM25PlusWeight,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_DOUBLE);
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_DOUBLE);
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _v = (Z_TYPE(argv[4]) == IS_DOUBLE);
            if (_v) {
              _v = (Z_TYPE(argv[5]) == IS_DOUBLE);
              if (_v) {
                _wrap_new_BM25PlusWeight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
              }
            }
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_BM25PlusWeight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianBM25PlusWeight,name) {
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::BM25PlusWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::BM25PlusWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianBM25PlusWeight,get_sumpart) {
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::BM25PlusWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBM25PlusWeight,get_maxpart) {
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::BM25PlusWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBM25PlusWeight,get_sumextra) {
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::BM25PlusWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBM25PlusWeight,get_maxextra) {
  Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::BM25PlusWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianBM25PlusWeight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianBM25PlusWeight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianBM25PlusWeight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_TradWeight__SWIG_0) {
  double arg1 ;
  zval args[1];
  Xapian::TradWeight *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::TradWeight *)new Xapian::TradWeight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__TradWeight, 1);
  
fail:
  return;
}


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


static PHP_METHOD(XapianTradWeight,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _wrap_new_TradWeight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_TradWeight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianTradWeight,name) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::TradWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::TradWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianTradWeight,get_sumpart) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::TradWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::TradWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTradWeight,get_maxpart) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::TradWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::TradWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTradWeight,get_sumextra) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::TradWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::TradWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianTradWeight,get_maxextra) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::TradWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::TradWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianTradWeight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianTradWeight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianTradWeight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_InL2Weight__SWIG_0) {
  double arg1 ;
  zval args[1];
  Xapian::InL2Weight *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::InL2Weight *)new Xapian::InL2Weight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__InL2Weight, 1);
  
fail:
  return;
}


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


static PHP_METHOD(XapianInL2Weight,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _wrap_new_InL2Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_InL2Weight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianInL2Weight,name) {
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::InL2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::InL2Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianInL2Weight,get_sumpart) {
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::InL2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::InL2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianInL2Weight,get_maxpart) {
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::InL2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::InL2Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianInL2Weight,get_sumextra) {
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::InL2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::InL2Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianInL2Weight,get_maxextra) {
  Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::InL2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::InL2Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianInL2Weight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianInL2Weight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianInL2Weight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_IfB2Weight__SWIG_0) {
  double arg1 ;
  zval args[1];
  Xapian::IfB2Weight *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::IfB2Weight *)new Xapian::IfB2Weight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__IfB2Weight, 1);
  
fail:
  return;
}


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


static PHP_METHOD(XapianIfB2Weight,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _wrap_new_IfB2Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_IfB2Weight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianIfB2Weight,name) {
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::IfB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::IfB2Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianIfB2Weight,get_sumpart) {
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::IfB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::IfB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianIfB2Weight,get_maxpart) {
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::IfB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::IfB2Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianIfB2Weight,get_sumextra) {
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::IfB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::IfB2Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianIfB2Weight,get_maxextra) {
  Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::IfB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::IfB2Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianIfB2Weight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianIfB2Weight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianIfB2Weight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_IneB2Weight__SWIG_0) {
  double arg1 ;
  zval args[1];
  Xapian::IneB2Weight *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::IneB2Weight *)new Xapian::IneB2Weight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__IneB2Weight, 1);
  
fail:
  return;
}


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


static PHP_METHOD(XapianIneB2Weight,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _wrap_new_IneB2Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_IneB2Weight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianIneB2Weight,name) {
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::IneB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::IneB2Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianIneB2Weight,get_sumpart) {
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::IneB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::IneB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianIneB2Weight,get_maxpart) {
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::IneB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::IneB2Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianIneB2Weight,get_sumextra) {
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::IneB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::IneB2Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianIneB2Weight,get_maxextra) {
  Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::IneB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::IneB2Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianIneB2Weight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianIneB2Weight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianIneB2Weight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_BB2Weight__SWIG_0) {
  double arg1 ;
  zval args[1];
  Xapian::BB2Weight *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::BB2Weight *)new Xapian::BB2Weight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__BB2Weight, 1);
  
fail:
  return;
}


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


static PHP_METHOD(XapianBB2Weight,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _wrap_new_BB2Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_BB2Weight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianBB2Weight,name) {
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::BB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::BB2Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianBB2Weight,get_sumpart) {
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::BB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBB2Weight,get_maxpart) {
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::BB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::BB2Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBB2Weight,get_sumextra) {
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::BB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::BB2Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianBB2Weight,get_maxextra) {
  Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::BB2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::BB2Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianBB2Weight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianBB2Weight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianBB2Weight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianDLHWeight,__construct) {
  Xapian::DLHWeight *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::DLHWeight *)new Xapian::DLHWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DLHWeight, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianDLHWeight,name) {
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::DLHWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::DLHWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDLHWeight,get_sumpart) {
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::DLHWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::DLHWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDLHWeight,get_maxpart) {
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::DLHWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::DLHWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDLHWeight,get_sumextra) {
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::DLHWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::DLHWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDLHWeight,get_maxextra) {
  Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::DLHWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::DLHWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianDLHWeight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianDLHWeight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianDLHWeight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_PL2Weight__SWIG_0) {
  double arg1 ;
  zval args[1];
  Xapian::PL2Weight *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::PL2Weight *)new Xapian::PL2Weight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__PL2Weight, 1);
  
fail:
  return;
}


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


static PHP_METHOD(XapianPL2Weight,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _wrap_new_PL2Weight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_PL2Weight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianPL2Weight,name) {
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::PL2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::PL2Weight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianPL2Weight,get_sumpart) {
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::PL2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::PL2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPL2Weight,get_maxpart) {
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::PL2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::PL2Weight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPL2Weight,get_sumextra) {
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::PL2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::PL2Weight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPL2Weight,get_maxextra) {
  Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
  double result;
  
  arg1 = (Xapian::PL2Weight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::PL2Weight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianPL2Weight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianPL2Weight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianPL2Weight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_PL2PlusWeight__SWIG_0) {
  double arg1 ;
  double arg2 ;
  zval args[2];
  Xapian::PL2PlusWeight *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::PL2PlusWeight *)new Xapian::PL2PlusWeight(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__PL2PlusWeight, 1);
  
fail:
  return;
}


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


static PHP_METHOD(XapianPL2PlusWeight,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_DOUBLE);
      if (_v) {
        _wrap_new_PL2PlusWeight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_PL2PlusWeight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianPL2PlusWeight,name) {
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::PL2PlusWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::PL2PlusWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianPL2PlusWeight,get_sumpart) {
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::PL2PlusWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPL2PlusWeight,get_maxpart) {
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::PL2PlusWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPL2PlusWeight,get_sumextra) {
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::PL2PlusWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPL2PlusWeight,get_maxextra) {
  Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::PL2PlusWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianPL2PlusWeight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianPL2PlusWeight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianPL2PlusWeight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianDPHWeight,__construct) {
  Xapian::DPHWeight *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::DPHWeight *)new Xapian::DPHWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DPHWeight, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianDPHWeight,name) {
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::DPHWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::DPHWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDPHWeight,get_sumpart) {
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::DPHWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::DPHWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDPHWeight,get_maxpart) {
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::DPHWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::DPHWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDPHWeight,get_sumextra) {
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::DPHWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::DPHWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDPHWeight,get_maxextra) {
  Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::DPHWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::DPHWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianDPHWeight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianDPHWeight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianDPHWeight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::Weight::type_smoothing) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg4 = (double) zval_get_double(&args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LMWeight, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LMWeight__SWIG_1) {
  double arg1 ;
  Xapian::Weight::type_smoothing arg2 ;
  double arg3 ;
  zval args[3];
  Xapian::LMWeight *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::Weight::type_smoothing) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LMWeight, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LMWeight__SWIG_2) {
  double arg1 ;
  Xapian::Weight::type_smoothing arg2 ;
  zval args[2];
  Xapian::LMWeight *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::Weight::type_smoothing) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LMWeight, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LMWeight__SWIG_3) {
  double arg1 ;
  zval args[1];
  Xapian::LMWeight *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LMWeight, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LMWeight__SWIG_4) {
  Xapian::LMWeight *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::LMWeight *)new Xapian::LMWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LMWeight, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianLMWeight,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _wrap_new_LMWeight__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG);
      if (_v) {
        _wrap_new_LMWeight__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG);
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_DOUBLE);
        if (_v) {
          _wrap_new_LMWeight__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG);
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_DOUBLE);
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _wrap_new_LMWeight__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_LMWeight'", 0);
fail:
  return;
}


static PHP_METHOD(XapianLMWeight,name) {
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::LMWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::LMWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianLMWeight,get_sumpart) {
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::LMWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::LMWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianLMWeight,get_maxpart) {
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::LMWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::LMWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianLMWeight,get_sumextra) {
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::LMWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::LMWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianLMWeight,get_maxextra) {
  Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::LMWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::LMWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianLMWeight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianLMWeight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianLMWeight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianCoordWeight,init) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  double arg2 ;
  zval args[1];
  
  arg1 = (Xapian::CoordWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->init(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianCoordWeight,__construct) {
  Xapian::CoordWeight *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::CoordWeight *)new Xapian::CoordWeight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__CoordWeight, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianCoordWeight,name) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::CoordWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::CoordWeight const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianCoordWeight,get_sumpart) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::termcount arg4 ;
  zval args[3];
  double result;
  
  arg1 = (Xapian::CoordWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (Xapian::termcount) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::CoordWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianCoordWeight,get_maxpart) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::CoordWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::CoordWeight const *)arg1)->get_maxpart();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianCoordWeight,get_sumextra) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::CoordWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::termcount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::CoordWeight const *)arg1)->get_sumextra(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianCoordWeight,get_maxextra) {
  Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
  double result;
  
  arg1 = (Xapian::CoordWeight *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::CoordWeight const *)arg1)->get_maxextra();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}




PHP_METHOD(XapianCoordWeight,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianWeight___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianCoordWeight,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianWeight___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianCoordWeight,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianWeight___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianCompactor,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::Compactor *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_Compactor) {
        /* not subclassed */
        result = new Xapian::Compactor();
      } else {
        result = (Xapian::Compactor *)new SwigDirector_Compactor(arg0);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Compactor, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianCompactor,set_block_size) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  size_t arg2 ;
  zval args[1];
  
  arg1 = (Xapian::Compactor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (size_t) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_block_size(SWIG_STD_MOVE(arg2));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianCompactor,set_renumber) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  bool arg2 ;
  zval args[1];
  
  arg1 = (Xapian::Compactor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg2 = (bool) zval_is_true(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_renumber(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianCompactor,set_multipass) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  bool arg2 ;
  zval args[1];
  
  arg1 = (Xapian::Compactor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg2 = (bool) zval_is_true(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_multipass(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianCompactor,set_compaction_level) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  Xapian::Compactor::compaction_level arg2 ;
  zval args[1];
  
  arg1 = (Xapian::Compactor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::Compactor::compaction_level) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_compaction_level(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianCompactor,set_destdir) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::Compactor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->set_destdir((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianCompactor,add_source) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::Compactor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->add_source((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianCompactor,compact) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  
  arg1 = (Xapian::Compactor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->compact();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianCompactor,set_status) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  Swig::Director *director = 0;
  bool upcall = false;
  
  arg1 = (Xapian::Compactor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianCompactor,resolve_duplicate_metadata) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  std::string *arg4 = (std::string *) (std::string *)0 ;
  std::string temp2 ;
  zval args[3];
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::Compactor *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (size_t) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg4, SWIGTYPE_p_std__string, 0) < 0) {
    zend_type_error("Expected SWIGTYPE_p_std__string for argument 4 of Compactor_resolve_duplicate_metadata");
    return;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        result = (arg1)->Xapian::Compactor::resolve_duplicate_metadata((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(std::string const (*))arg4);
      } else {
        result = (arg1)->resolve_duplicate_metadata((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(std::string const (*))arg4);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianCompactor,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::Compactor*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianCompactor,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianCompactor,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianPostingSource,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::PostingSource *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  if (Z_OBJCE_P(arg0) == SWIG_Php_ce_PostingSource) {
    /* not subclassed */
    zend_throw_exception(zend_ce_type_error, "accessing abstract class or protected constructor", 0);
    return;
  } else {
    result = (Xapian::PostingSource *)new SwigDirector_PostingSource(arg0);
  }
  
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__PostingSource, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,get_termfreq_min) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::doccount result;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_min");
      } else {
        result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_min();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,get_termfreq_est) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::doccount result;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_est");
      } else {
        result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_est();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,get_termfreq_max) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::doccount result;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_max");
      } else {
        result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_max();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,set_maxweight) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  double arg2 ;
  zval args[1];
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_maxweight(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,get_maxweight) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  double result;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (double)((Xapian::PostingSource const *)arg1)->get_maxweight();
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,get_weight) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  double result;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,get_docid) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::docid result;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_docid");
      } else {
        result = (Xapian::docid)((Xapian::PostingSource const *)arg1)->get_docid();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,next) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  double arg2 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::next");
      } else {
        (arg1)->next(arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,skip_to) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval args[2];
  Swig::Director *director = 0;
  bool upcall = false;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        (arg1)->Xapian::PostingSource::skip_to(arg2,arg3);
      } else {
        (arg1)->skip_to(arg2,arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,check) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval args[2];
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        result = (bool)(arg1)->Xapian::PostingSource::check(arg2,arg3);
      } else {
        result = (bool)(arg1)->check(arg2,arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,at_end) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::at_end");
      } else {
        result = (bool)((Xapian::PostingSource const *)arg1)->at_end();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,name) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,init) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Database for argument 2 of PostingSource_init");
    return;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::init");
      } else {
        (arg1)->init((Xapian::Database const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,get_description) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianPostingSource,release) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::PostingSource *result = 0 ;
  
  arg1 = (Xapian::PostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::PostingSource *)((Xapian::PostingSource const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__PostingSource, 0);
  
fail:
  return;
}




PHP_METHOD(XapianPostingSource,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::PostingSource*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianPostingSource,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianPostingSource,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianValuePostingSource,__construct) {
  Xapian::valueno arg1 ;
  zval args[1];
  zval *arg0 = ZEND_THIS;
  Xapian::ValuePostingSource *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_ValuePostingSource) {
        /* not subclassed */
        result = new Xapian::ValuePostingSource(arg1);
      } else {
        result = (Xapian::ValuePostingSource *)new SwigDirector_ValuePostingSource(arg0, arg1);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ValuePostingSource, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,get_termfreq_min) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::doccount result;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,get_termfreq_est) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::doccount result;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,get_termfreq_max) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::doccount result;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,next) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  double arg2 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        (arg1)->Xapian::ValuePostingSource::next(arg2);
      } else {
        (arg1)->next(arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,skip_to) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval args[2];
  Swig::Director *director = 0;
  bool upcall = false;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        (arg1)->Xapian::ValuePostingSource::skip_to(arg2,arg3);
      } else {
        (arg1)->skip_to(arg2,arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,check) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval args[2];
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        result = (bool)(arg1)->Xapian::ValuePostingSource::check(arg2,arg3);
      } else {
        result = (bool)(arg1)->check(arg2,arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,at_end) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,get_docid) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::docid result;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,init) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Database for argument 2 of ValuePostingSource_init");
    return;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        (arg1)->Xapian::ValuePostingSource::init((Xapian::Database const &)*arg2);
      } else {
        (arg1)->init((Xapian::Database const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,get_database) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::Database result;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ValuePostingSource const *)arg1)->get_database();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,get_slot) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::valueno result;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::valueno)((Xapian::ValuePostingSource const *)arg1)->get_slot();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,get_value) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ValuePostingSource const *)arg1)->get_value();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,done) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->done();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,get_started) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  bool result;
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (bool)((Xapian::ValuePostingSource const *)arg1)->get_started();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,set_termfreq_min) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::doccount arg2 ;
  zval args[1];
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_termfreq_min(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,set_termfreq_est) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::doccount arg2 ;
  zval args[1];
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_termfreq_est(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValuePostingSource,set_termfreq_max) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::doccount arg2 ;
  zval args[1];
  
  arg1 = (Xapian::ValuePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::doccount) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_termfreq_max(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}




PHP_METHOD(XapianValuePostingSource,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::ValuePostingSource*)(arg->ptr));
      if (director) director->swig_disown();
    }
  } else {
    PHP_MN(XapianPostingSource___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianValuePostingSource,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianPostingSource___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianValuePostingSource,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianPostingSource___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianValueWeightPostingSource,__construct) {
  Xapian::valueno arg1 ;
  zval args[1];
  zval *arg0 = ZEND_THIS;
  Xapian::ValueWeightPostingSource *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_ValueWeightPostingSource) {
        /* not subclassed */
        result = new Xapian::ValueWeightPostingSource(arg1);
      } else {
        result = (Xapian::ValueWeightPostingSource *)new SwigDirector_ValueWeightPostingSource(arg0, arg1);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ValueWeightPostingSource, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianValueWeightPostingSource,get_weight) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  double result;
  
  arg1 = (Xapian::ValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValueWeightPostingSource,name) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::ValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianValueWeightPostingSource,init) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  
  arg1 = (Xapian::ValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Database for argument 2 of ValueWeightPostingSource_init");
    return;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        (arg1)->Xapian::ValueWeightPostingSource::init((Xapian::Database const &)*arg2);
      } else {
        (arg1)->init((Xapian::Database const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueWeightPostingSource,get_description) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::ValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianValueWeightPostingSource,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::ValueWeightPostingSource*)(arg->ptr));
      if (director) director->swig_disown();
    }
  } else {
    PHP_MN(XapianValuePostingSource___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianValueWeightPostingSource,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianValuePostingSource___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianValueWeightPostingSource,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianValuePostingSource___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_DecreasingValueWeightPostingSource__SWIG_0) {
  Xapian::valueno arg1 ;
  Xapian::docid arg2 ;
  Xapian::docid arg3 ;
  zval args[3];
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::docid) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_DecreasingValueWeightPostingSource__SWIG_1) {
  Xapian::valueno arg1 ;
  Xapian::docid arg2 ;
  zval args[2];
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_DecreasingValueWeightPostingSource__SWIG_2) {
  Xapian::valueno arg1 ;
  zval args[1];
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianDecreasingValueWeightPostingSource,__construct) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_new_DecreasingValueWeightPostingSource__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_new_DecreasingValueWeightPostingSource__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_new_DecreasingValueWeightPostingSource__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_DecreasingValueWeightPostingSource'", 0);
fail:
  return;
}


static PHP_METHOD(XapianDecreasingValueWeightPostingSource,get_weight) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  double result;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDecreasingValueWeightPostingSource,name) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDecreasingValueWeightPostingSource,init) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Database for argument 2 of DecreasingValueWeightPostingSource_init");
    return;
  }
  
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDecreasingValueWeightPostingSource,next) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  double arg2 ;
  zval args[1];
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->next(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDecreasingValueWeightPostingSource,skip_to) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval args[2];
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDecreasingValueWeightPostingSource,check) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval args[2];
  bool result;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianDecreasingValueWeightPostingSource,get_description) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianDecreasingValueWeightPostingSource,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianValueWeightPostingSource___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianDecreasingValueWeightPostingSource,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianValueWeightPostingSource___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianDecreasingValueWeightPostingSource,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianValueWeightPostingSource___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianValueMapPostingSource,__construct) {
  Xapian::valueno arg1 ;
  zval args[1];
  Xapian::ValueMapPostingSource *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::ValueMapPostingSource *)new Xapian::ValueMapPostingSource(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ValueMapPostingSource, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianValueMapPostingSource,add_mapping) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  std::string *arg2 = 0 ;
  double arg3 ;
  std::string temp2 ;
  zval args[2];
  
  arg1 = (Xapian::ValueMapPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->add_mapping((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueMapPostingSource,clear_mappings) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  
  arg1 = (Xapian::ValueMapPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->clear_mappings();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueMapPostingSource,set_default_weight) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  double arg2 ;
  zval args[1];
  
  arg1 = (Xapian::ValueMapPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->set_default_weight(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueMapPostingSource,get_weight) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  double result;
  
  arg1 = (Xapian::ValueMapPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::ValueMapPostingSource const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValueMapPostingSource,name) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueMapPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ValueMapPostingSource const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianValueMapPostingSource,init) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::ValueMapPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Database for argument 2 of ValueMapPostingSource_init");
    return;
  }
  
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueMapPostingSource,get_description) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueMapPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ValueMapPostingSource const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianValueMapPostingSource,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianValuePostingSource___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianValueMapPostingSource,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianValuePostingSource___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianValueMapPostingSource,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianValuePostingSource___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianFixedWeightPostingSource,__construct) {
  double arg1 ;
  zval args[1];
  Xapian::FixedWeightPostingSource *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::FixedWeightPostingSource *)new Xapian::FixedWeightPostingSource(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__FixedWeightPostingSource, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,get_termfreq_min) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_min();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,get_termfreq_est) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_est();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,get_termfreq_max) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_max();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,get_weight) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  double result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::FixedWeightPostingSource const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,next) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  double arg2 ;
  zval args[1];
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->next(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,skip_to) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval args[2];
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,check) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval args[2];
  bool result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,at_end) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  bool result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (bool)((Xapian::FixedWeightPostingSource const *)arg1)->at_end();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,get_docid) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::docid)((Xapian::FixedWeightPostingSource const *)arg1)->get_docid();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,name) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::FixedWeightPostingSource const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,init) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Database for argument 2 of FixedWeightPostingSource_init");
    return;
  }
  
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianFixedWeightPostingSource,get_description) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::FixedWeightPostingSource const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianFixedWeightPostingSource,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianPostingSource___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianFixedWeightPostingSource,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianPostingSource___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianFixedWeightPostingSource,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianPostingSource___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianMatchSpy,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::MatchSpy *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  if (Z_OBJCE_P(arg0) == SWIG_Php_ce_MatchSpy) {
    /* not subclassed */
    zend_throw_exception(zend_ce_type_error, "accessing abstract class or protected constructor", 0);
    return;
  } else {
    result = (Xapian::MatchSpy *)new SwigDirector_MatchSpy(arg0);
  }
  
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__MatchSpy, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianMatchSpy,apply) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  Xapian::Document *arg2 = 0 ;
  double arg3 ;
  zval args[2];
  Swig::Director *director = 0;
  bool upcall = false;
  
  arg1 = (Xapian::MatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 2 of MatchSpy_apply");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::MatchSpy::operator ()");
      } else {
        (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianMatchSpy,name) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::MatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianMatchSpy,merge_results) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Swig::Director *director = 0;
  bool upcall = false;
  
  arg1 = (Xapian::MatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        (arg1)->Xapian::MatchSpy::merge_results((std::string const &)*arg2);
      } else {
        (arg1)->merge_results((std::string const &)*arg2);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianMatchSpy,get_description) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::MatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    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, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianMatchSpy,release) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  Xapian::MatchSpy *result = 0 ;
  
  arg1 = (Xapian::MatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::MatchSpy *)((Xapian::MatchSpy const *)arg1)->release();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_Xapian__MatchSpy, 0);
  
fail:
  return;
}




PHP_METHOD(XapianMatchSpy,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::MatchSpy*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianMatchSpy,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianMatchSpy,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_ValueCountMatchSpy__SWIG_0) {
  Xapian::ValueCountMatchSpy *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_ValueCountMatchSpy__SWIG_1) {
  Xapian::valueno arg1 ;
  zval args[1];
  Xapian::ValueCountMatchSpy *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__ValueCountMatchSpy, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianValueCountMatchSpy,__construct) {
  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 = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_new_ValueCountMatchSpy__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_ValueCountMatchSpy'", 0);
fail:
  return;
}


static PHP_METHOD(XapianValueCountMatchSpy,get_total) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_total();
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianValueCountMatchSpy,values_begin) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianValueCountMatchSpy,values_end) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianValueCountMatchSpy,top_values_begin) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t arg2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (size_t) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_begin(SWIG_STD_MOVE(arg2));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianValueCountMatchSpy,top_values_end) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t arg2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (size_t) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_end(SWIG_STD_MOVE(arg2));
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianValueCountMatchSpy,apply) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  Xapian::Document *arg2 = 0 ;
  double arg3 ;
  zval args[2];
  
  arg1 = (Xapian::ValueCountMatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 2 of ValueCountMatchSpy_apply");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueCountMatchSpy,name) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianValueCountMatchSpy,merge_results) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::ValueCountMatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->merge_results((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianValueCountMatchSpy,get_description) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianValueCountMatchSpy,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianMatchSpy___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianValueCountMatchSpy,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianMatchSpy___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianValueCountMatchSpy,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianMatchSpy___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(Xapian,miles_to_metres) {
  PHP_FN(miles_to_metres)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_FUNCTION(miles_to_metres) {
  double arg1 ;
  zval args[1];
  double result;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)Xapian::miles_to_metres(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(Xapian,metres_to_miles) {
  PHP_FN(metres_to_miles)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_FUNCTION(metres_to_miles) {
  double arg1 ;
  zval args[1];
  double result;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)Xapian::metres_to_miles(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoord,latitude_set) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  double arg2 ;
  zval args[1];
  
  arg1 = (Xapian::LatLongCoord *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  if (arg1) (arg1)->latitude = arg2;
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoord,latitude_get) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  double result;
  
  arg1 = (Xapian::LatLongCoord *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (double) ((arg1)->latitude);
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoord,longitude_set) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  double arg2 ;
  zval args[1];
  
  arg1 = (Xapian::LatLongCoord *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  if (arg1) (arg1)->longitude = arg2;
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoord,longitude_get) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  double result;
  
  arg1 = (Xapian::LatLongCoord *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (double) ((arg1)->longitude);
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoord__SWIG_0) {
  Xapian::LatLongCoord *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::LatLongCoord *)new Xapian::LatLongCoord();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongCoord, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoord__SWIG_1) {
  double arg1 ;
  double arg2 ;
  zval args[2];
  Xapian::LatLongCoord *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongCoord *)new Xapian::LatLongCoord(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongCoord, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoord,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_DOUBLE);
      if (_v) {
        _wrap_new_LatLongCoord__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_LatLongCoord'", 0);
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoord,unserialise) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::LatLongCoord *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->unserialise((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoord,serialise) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  std::string result;
  
  arg1 = (Xapian::LatLongCoord *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::LatLongCoord const *)arg1)->serialise();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoord,get_description) {
  Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
  std::string result;
  
  arg1 = (Xapian::LatLongCoord *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::LatLongCoord const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianLatLongCoord,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"latitude") == 0) {
    ZVAL_STRING(&tempZval, "latitude_set");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,1,&args[1]);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"longitude") == 0) {
    ZVAL_STRING(&tempZval, "longitude_set");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,1,&args[1]);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongCoord,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"latitude") == 0) {
    ZVAL_STRING(&tempZval, "latitude_get");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,0,NULL);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"longitude") == 0) {
    ZVAL_STRING(&tempZval, "longitude_get");
    call_user_function(EG(function_table),ZEND_THIS,&tempZval,return_value,0,NULL);
    zval_ptr_dtor(&tempZval);
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongCoord,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  
  else if (strcmp(ZSTR_VAL(arg2),"latitude") == 0) {
    RETVAL_TRUE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"longitude") == 0) {
    RETVAL_TRUE;
  }
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianLatLongCoordsIterator,__construct) {
  Xapian::LatLongCoordsIterator *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::LatLongCoordsIterator *)new Xapian::LatLongCoordsIterator();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoordsIterator,equals) {
  Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
  Xapian::LatLongCoordsIterator *arg2 = 0 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::LatLongCoordsIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoordsIterator for argument 2 of LatLongCoordsIterator_equals");
    return;
  }
  
  {
    try {
      result = (bool)Xapian_LatLongCoordsIterator_equals((Xapian::LatLongCoordsIterator const *)arg1,(Xapian::LatLongCoordsIterator const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoordsIterator,get_coord) {
  Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
  Xapian::LatLongCoord result;
  
  arg1 = (Xapian::LatLongCoordsIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = Xapian_LatLongCoordsIterator_get_coord((Xapian::LatLongCoordsIterator const *)arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::LatLongCoord * resultobj = new Xapian::LatLongCoord(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__LatLongCoord, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoordsIterator,next) {
  Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
  
  arg1 = (Xapian::LatLongCoordsIterator *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      Xapian_LatLongCoordsIterator_next(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}




PHP_METHOD(XapianLatLongCoordsIterator,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongCoordsIterator,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongCoordsIterator,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianLatLongCoords,begin) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  Xapian::LatLongCoordsIterator result;
  
  arg1 = (Xapian::LatLongCoords *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::LatLongCoords const *)arg1)->begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::LatLongCoordsIterator * resultobj = new Xapian::LatLongCoordsIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoords,end) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  Xapian::LatLongCoordsIterator result;
  
  arg1 = (Xapian::LatLongCoords *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::LatLongCoords const *)arg1)->end();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::LatLongCoordsIterator * resultobj = new Xapian::LatLongCoordsIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__LatLongCoordsIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoords,size) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  size_t result;
  
  arg1 = (Xapian::LatLongCoords *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::LatLongCoords const *)arg1)->size();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoords,is_empty) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  bool result;
  
  arg1 = (Xapian::LatLongCoords *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (bool)((Xapian::LatLongCoords const *)arg1)->empty();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoords,append) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  Xapian::LatLongCoord *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::LatLongCoords *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoord for argument 2 of LatLongCoords_append");
    return;
  }
  
  {
    try {
      (arg1)->append((Xapian::LatLongCoord const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoords__SWIG_0) {
  Xapian::LatLongCoords *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::LatLongCoords *)new Xapian::LatLongCoords();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongCoords, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LatLongCoords__SWIG_1) {
  Xapian::LatLongCoord *arg1 = 0 ;
  zval args[1];
  Xapian::LatLongCoords *result = 0 ;
  
  if(ZEND_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) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoord for argument 1 of new_LatLongCoords");
    return;
  }
  
  {
    try {
      result = (Xapian::LatLongCoords *)new Xapian::LatLongCoords((Xapian::LatLongCoord const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongCoords, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoords,__construct) {
  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 = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoord, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _wrap_new_LatLongCoords__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_LatLongCoords'", 0);
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoords,unserialise) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::LatLongCoords *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->unserialise((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoords,serialise) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  std::string result;
  
  arg1 = (Xapian::LatLongCoords *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::LatLongCoords const *)arg1)->serialise();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongCoords,get_description) {
  Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
  std::string result;
  
  arg1 = (Xapian::LatLongCoords *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::LatLongCoords const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianLatLongCoords,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongCoords,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongCoords,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static PHP_METHOD(XapianLatLongMetric,pointwise_distance) {
  Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
  Xapian::LatLongCoord *arg2 = 0 ;
  Xapian::LatLongCoord *arg3 = 0 ;
  zval args[2];
  Swig::Director *director = 0;
  bool upcall = false;
  double result;
  
  arg1 = (Xapian::LatLongMetric *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoord for argument 2 of LatLongMetric_pointwise_distance");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoord for argument 3 of LatLongMetric_pointwise_distance");
    return;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::LatLongMetric::pointwise_distance");
      } else {
        result = (double)((Xapian::LatLongMetric const *)arg1)->pointwise_distance((Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongCoord const &)*arg3);
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_LatLongMetric_apply__SWIG_0) {
  Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  Xapian::LatLongCoords *arg3 = 0 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::LatLongMetric *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of LatLongMetric_apply");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 3 of LatLongMetric_apply");
    return;
  }
  
  {
    try {
      result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongCoords const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static 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[2];
  double result;
  
  arg1 = (Xapian::LatLongMetric *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of LatLongMetric_apply");
    return;
  }
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static 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[3];
  double result;
  
  arg1 = (Xapian::LatLongMetric *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of LatLongMetric_apply");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,57,CONVERT_STRING_IN@*/
  if (Z_ISNULL(args[1])) {
    arg3 = (char *) 0;
  } else {
    convert_to_string(&args[1]);
    arg3 = (char *) Z_STRVAL(args[1]);
  }
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (size_t) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(char const *)arg3,SWIG_STD_MOVE(arg4));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongMetric,apply) {
  int argc;
  zval argv[3];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 2) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _wrap_LatLongMetric_apply__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_LatLongMetric_apply__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(&argv[0], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_STRING || Z_TYPE(argv[1]) == IS_NULL); 
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          ((size_t)-1 >= ZEND_LONG_MAX || (zend_long)(size_t)-1 >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_LatLongMetric_apply__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'LatLongMetric_apply'", 0);
fail:
  return;
}


static PHP_METHOD(XapianLatLongMetric,name) {
  Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  arg1 = (Xapian::LatLongMetric *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==Z_OBJ_P(ZEND_THIS)));
  {
    try {
      if (upcall) {
        Swig::DirectorPureVirtualException::raise("Xapian::LatLongMetric::name");
      } else {
        result = ((Xapian::LatLongMetric const *)arg1)->name();
      }
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongMetric,__construct) {
  zval *arg0 = ZEND_THIS;
  Xapian::LatLongMetric *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      if (Z_OBJCE_P(arg0) == SWIG_Php_ce_LatLongMetric) {
        /* not subclassed */
        zend_throw_exception(zend_ce_type_error, "accessing abstract class or protected constructor", 0);
        return;
      } else {
        result = (Xapian::LatLongMetric *)new SwigDirector_LatLongMetric(arg0);
      }
      
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongMetric, 1);
  
fail:
  return;
}




PHP_METHOD(XapianLatLongMetric,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
    if (arg->newobject == 0) {
      Swig::Director *director = SWIG_DIRECTOR_CAST((Xapian::LatLongMetric*)(arg->ptr));
      if (director) director->swig_disown();
    }
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongMetric,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongMetric,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_GreatCircleMetric__SWIG_0) {
  Xapian::GreatCircleMetric *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::GreatCircleMetric *)new Xapian::GreatCircleMetric();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__GreatCircleMetric, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_GreatCircleMetric__SWIG_1) {
  double arg1 ;
  zval args[1];
  Xapian::GreatCircleMetric *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg1 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::GreatCircleMetric *)new Xapian::GreatCircleMetric(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__GreatCircleMetric, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianGreatCircleMetric,__construct) {
  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 = 0;
    _v = (Z_TYPE(argv[0]) == IS_DOUBLE);
    if (_v) {
      _wrap_new_GreatCircleMetric__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_GreatCircleMetric'", 0);
fail:
  return;
}


static PHP_METHOD(XapianGreatCircleMetric,pointwise_distance) {
  Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *) 0 ;
  Xapian::LatLongCoord *arg2 = 0 ;
  Xapian::LatLongCoord *arg3 = 0 ;
  zval args[2];
  double result;
  
  arg1 = (Xapian::GreatCircleMetric *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoord for argument 2 of GreatCircleMetric_pointwise_distance");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoord for argument 3 of GreatCircleMetric_pointwise_distance");
    return;
  }
  
  {
    try {
      result = (double)((Xapian::GreatCircleMetric const *)arg1)->pointwise_distance((Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongCoord const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianGreatCircleMetric,name) {
  Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *) 0 ;
  std::string result;
  
  arg1 = (Xapian::GreatCircleMetric *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::GreatCircleMetric const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianGreatCircleMetric,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianLatLongMetric___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianGreatCircleMetric,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianLatLongMetric___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianGreatCircleMetric,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianLatLongMetric___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistancePostingSource");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongMetric for argument 3 of new_LatLongDistancePostingSource");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg4 = (double) zval_get_double(&args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg5 = (double) zval_get_double(&args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg6 = (double) zval_get_double(&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(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistancePostingSource");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongMetric for argument 3 of new_LatLongDistancePostingSource");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg4 = (double) zval_get_double(&args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg5 = (double) zval_get_double(&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(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistancePostingSource");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongMetric for argument 3 of new_LatLongDistancePostingSource");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg4 = (double) zval_get_double(&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(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistancePostingSource");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongMetric for argument 3 of new_LatLongDistancePostingSource");
    return;
  }
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistancePostingSource");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg4 = (double) zval_get_double(&args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg5 = (double) zval_get_double(&args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3,arg4,arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistancePostingSource");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg4 = (double) zval_get_double(&args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource__SWIG_6) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  double arg3 ;
  zval args[3];
  Xapian::LatLongDistancePostingSource *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistancePostingSource");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistancePostingSource__SWIG_7) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  zval args[2];
  Xapian::LatLongDistancePostingSource *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistancePostingSource");
    return;
  }
  
  {
    try {
      result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongDistancePostingSource,__construct) {
  int argc;
  zval argv[6];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _wrap_new_LatLongDistancePostingSource__SWIG_7(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _wrap_new_LatLongDistancePostingSource__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_DOUBLE);
        if (_v) {
          _wrap_new_LatLongDistancePostingSource__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _wrap_new_LatLongDistancePostingSource__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_DOUBLE);
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _wrap_new_LatLongDistancePostingSource__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _v = (Z_TYPE(argv[4]) == IS_DOUBLE);
            if (_v) {
              _wrap_new_LatLongDistancePostingSource__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_DOUBLE);
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _v = (Z_TYPE(argv[4]) == IS_DOUBLE);
            if (_v) {
              _wrap_new_LatLongDistancePostingSource__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _v = (Z_TYPE(argv[4]) == IS_DOUBLE);
            if (_v) {
              _v = (Z_TYPE(argv[5]) == IS_DOUBLE);
              if (_v) {
                _wrap_new_LatLongDistancePostingSource__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
              }
            }
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_LatLongDistancePostingSource'", 0);
fail:
  return;
}


static PHP_METHOD(XapianLatLongDistancePostingSource,next) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  double arg2 ;
  zval args[1];
  
  arg1 = (Xapian::LatLongDistancePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg2 = (double) zval_get_double(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->next(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongDistancePostingSource,skip_to) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval args[2];
  
  arg1 = (Xapian::LatLongDistancePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongDistancePostingSource,check) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  Xapian::docid arg2 ;
  double arg3 ;
  zval args[2];
  bool result;
  
  arg1 = (Xapian::LatLongDistancePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg3 = (double) zval_get_double(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongDistancePostingSource,get_weight) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  double result;
  
  arg1 = (Xapian::LatLongDistancePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::LatLongDistancePostingSource const *)arg1)->get_weight();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongDistancePostingSource,name) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::LatLongDistancePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::LatLongDistancePostingSource const *)arg1)->name();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongDistancePostingSource,init) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::LatLongDistancePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Database for argument 2 of LatLongDistancePostingSource_init");
    return;
  }
  
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongDistancePostingSource,get_description) {
  Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::LatLongDistancePostingSource *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::LatLongDistancePostingSource const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianLatLongDistancePostingSource,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianValuePostingSource___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongDistancePostingSource,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianValuePostingSource___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongDistancePostingSource,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianValuePostingSource___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistanceKeyMaker");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongMetric for argument 3 of new_LatLongDistanceKeyMaker");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg4 = (double) zval_get_double(&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(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistanceKeyMaker");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongMetric for argument 3 of new_LatLongDistanceKeyMaker");
    return;
  }
  
  {
    try {
      result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistanceKeyMaker__SWIG_2) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoords *arg2 = 0 ;
  zval args[2];
  Xapian::LatLongDistanceKeyMaker *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoords, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoords for argument 2 of new_LatLongDistanceKeyMaker");
    return;
  }
  
  {
    try {
      result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoord for argument 2 of new_LatLongDistanceKeyMaker");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongMetric for argument 3 of new_LatLongDistanceKeyMaker");
    return;
  }
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,48,CONVERT_FLOAT_IN@*/
  arg4 = (double) zval_get_double(&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(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
fail:
  return;
}


static 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 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoord for argument 2 of new_LatLongDistanceKeyMaker");
    return;
  }
  
  
  if (SWIG_ConvertPtr(&args[2], (void **) &arg3, SWIGTYPE_p_Xapian__LatLongMetric, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongMetric for argument 3 of new_LatLongDistanceKeyMaker");
    return;
  }
  
  {
    try {
      result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_LatLongDistanceKeyMaker__SWIG_5) {
  Xapian::valueno arg1 ;
  Xapian::LatLongCoord *arg2 = 0 ;
  zval args[2];
  Xapian::LatLongDistanceKeyMaker *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg2, SWIGTYPE_p_Xapian__LatLongCoord, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__LatLongCoord for argument 2 of new_LatLongDistanceKeyMaker");
    return;
  }
  
  {
    try {
      result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianLatLongDistanceKeyMaker,__construct) {
  int argc;
  zval argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _wrap_new_LatLongDistanceKeyMaker__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoord, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _wrap_new_LatLongDistanceKeyMaker__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoord, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _wrap_new_LatLongDistanceKeyMaker__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _wrap_new_LatLongDistanceKeyMaker__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _wrap_new_LatLongDistanceKeyMaker__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongCoord, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        {
          void *tmp;
          _v = (SWIG_ConvertPtr(&argv[2], (void**)&tmp, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL) >= 0);
        }
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_DOUBLE);
          if (_v) {
            _wrap_new_LatLongDistanceKeyMaker__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_LatLongDistanceKeyMaker'", 0);
fail:
  return;
}


static PHP_METHOD(XapianLatLongDistanceKeyMaker,apply) {
  Xapian::LatLongDistanceKeyMaker *arg1 = (Xapian::LatLongDistanceKeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval args[1];
  std::string result;
  
  arg1 = (Xapian::LatLongDistanceKeyMaker *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 2 of LatLongDistanceKeyMaker_apply");
    return;
  }
  
  {
    try {
      result = ((Xapian::LatLongDistanceKeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianLatLongDistanceKeyMaker,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianKeyMaker___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongDistanceKeyMaker,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianKeyMaker___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianLatLongDistanceKeyMaker,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianKeyMaker___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static PHP_METHOD(XapianDatabase,add_database) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::Database *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Database, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Database for argument 2 of Database_add_database");
    return;
  }
  
  {
    try {
      (arg1)->add_database((Xapian::Database const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,size) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  size_t result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->size();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Database__SWIG_0) {
  Xapian::Database *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Database, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Database__SWIG_1) {
  std::string *arg1 = 0 ;
  int arg2 ;
  std::string temp1 ;
  zval args[2];
  Xapian::Database *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Database, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Database__SWIG_2) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  Xapian::Database *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Database, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Database__SWIG_3) {
  int arg1 ;
  int arg2 ;
  zval args[2];
  Xapian::Database *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Database, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_Database__SWIG_4) {
  int arg1 ;
  zval args[1];
  Xapian::Database *result = 0 ;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__Database, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,__construct) {
  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 = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_Database__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_new_Database__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_new_Database__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_new_Database__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_Database'", 0);
fail:
  return;
}


static PHP_METHOD(XapianDatabase,reopen) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  bool result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (bool)(arg1)->reopen();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,close) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->close();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_description) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,postlist_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::PostingIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->postlist_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::PostingIterator * resultobj = new Xapian::PostingIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PostingIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,postlist_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::PostingIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  result = ((Xapian::Database const *)arg1)->postlist_end((std::string const &)*arg2);
  {
    Xapian::PostingIterator * resultobj = new Xapian::PostingIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PostingIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,termlist_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->termlist_begin(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,termlist_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  result = ((Xapian::Database const *)arg1)->termlist_end(arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,has_positions) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  bool result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (bool)((Xapian::Database const *)arg1)->has_positions();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,positionlist_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  std::string *arg3 = 0 ;
  std::string temp3 ;
  zval args[2];
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->positionlist_begin(arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,positionlist_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  std::string *arg3 = 0 ;
  std::string temp3 ;
  zval args[2];
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  result = ((Xapian::Database const *)arg1)->positionlist_end(arg2,(std::string const &)*arg3);
  {
    Xapian::PositionIterator * resultobj = new Xapian::PositionIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__PositionIterator, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_allterms_begin__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_allterms_begin__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,allterms_begin) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_Database_allterms_begin__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Database_allterms_begin__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Database_allterms_begin'", 0);
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_allterms_end__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  result = ((Xapian::Database const *)arg1)->allterms_end((std::string const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_allterms_end__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::Database const *)arg1)->allterms_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,allterms_end) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_Database_allterms_end__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Database_allterms_end__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Database_allterms_end'", 0);
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_doccount) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_doccount();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_lastdocid) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::docid)((Xapian::Database const *)arg1)->get_lastdocid();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_avlength) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::doclength result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::doclength)((Xapian::Database const *)arg1)->get_avlength();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_average_length) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  double result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (double)((Xapian::Database const *)arg1)->get_average_length();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_DOUBLE(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_total_length) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::totallength result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::totallength)((Xapian::Database const *)arg1)->get_total_length();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_termfreq) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::doccount result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_termfreq((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,term_exists) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  bool result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = (bool)((Xapian::Database const *)arg1)->term_exists((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_collection_freq) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_collection_freq((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_value_freq) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  zval args[1];
  Xapian::doccount result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_value_freq(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_value_lower_bound) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  zval args[1];
  std::string result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_value_lower_bound(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_value_upper_bound) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  zval args[1];
  std::string result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_value_upper_bound(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_doclength_lower_bound) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_lower_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_doclength_upper_bound) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_upper_bound();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_wdf_upper_bound) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_wdf_upper_bound((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,valuestream_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  zval args[1];
  Xapian::ValueIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->valuestream_begin(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::ValueIterator * resultobj = new Xapian::ValueIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ValueIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,valuestream_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  zval args[1];
  Xapian::ValueIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::valueno) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  result = ((Xapian::Database const *)arg1)->valuestream_end(arg2);
  {
    Xapian::ValueIterator * resultobj = new Xapian::ValueIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__ValueIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_doclength) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_unique_terms) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_unique_terms(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,keep_alive) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->keep_alive();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_get_document__SWIG_0) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  Xapian::Document result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_document(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Document * resultobj = new Xapian::Document(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Document, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_get_document__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  unsigned int arg3 ;
  zval args[2];
  Xapian::Document result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_document(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Document * resultobj = new Xapian::Document(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Document, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_document) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_Database_get_document__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Database_get_document__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Database_get_document'", 0);
fail:
  return;
}


static 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[2];
  std::string result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static 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[1];
  std::string result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_spelling_suggestion) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Database_get_spelling_suggestion__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Database_get_spelling_suggestion__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Database_get_spelling_suggestion'", 0);
fail:
  return;
}


static PHP_METHOD(XapianDatabase,spellings_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->spellings_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,spellings_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::Database const *)arg1)->spellings_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,synonyms_begin) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonyms_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,synonyms_end) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  result = ((Xapian::Database const *)arg1)->synonyms_end((std::string const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static 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[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_synonym_keys_begin__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,synonym_keys_begin) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_Database_synonym_keys_begin__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Database_synonym_keys_begin__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Database_synonym_keys_begin'", 0);
fail:
  return;
}


static 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[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  result = ((Xapian::Database const *)arg1)->synonym_keys_end((std::string const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_synonym_keys_end__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::Database const *)arg1)->synonym_keys_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,synonym_keys_end) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_Database_synonym_keys_end__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Database_synonym_keys_end__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Database_synonym_keys_end'", 0);
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_metadata) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  std::string result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_metadata((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static 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[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_begin((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_metadata_keys_begin__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_begin();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,metadata_keys_begin) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_Database_metadata_keys_begin__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Database_metadata_keys_begin__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Database_metadata_keys_begin'", 0);
fail:
  return;
}


static 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[1];
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  result = ((Xapian::Database const *)arg1)->metadata_keys_end((std::string const &)*arg2);
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_metadata_keys_end__SWIG_1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = ((Xapian::Database const *)arg1)->metadata_keys_end();
  {
    Xapian::TermIterator * resultobj = new Xapian::TermIterator(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__TermIterator, 1);
  }
fail:
  return;
}


static PHP_METHOD(XapianDatabase,metadata_keys_end) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_Database_metadata_keys_end__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Database_metadata_keys_end__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Database_metadata_keys_end'", 0);
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_uuid) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_uuid();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,locked) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  bool result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (bool)((Xapian::Database const *)arg1)->locked();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_BOOL((result) ? 1 : 0);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,get_revision) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::rev result;
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::rev)((Xapian::Database const *)arg1)->get_revision();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_check__SWIG_0) {
  std::string *arg1 = 0 ;
  int arg2 ;
  std::string temp1 ;
  zval args[2];
  size_t result;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Database::check((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_check__SWIG_1) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  size_t result;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = Xapian::Database::check((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_check__SWIG_2) {
  int arg1 ;
  int arg2 ;
  zval args[2];
  size_t result;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Database::check(arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_check__SWIG_3) {
  int arg1 ;
  zval args[1];
  size_t result;
  
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg1 = (int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Database::check(arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,check) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Database_check__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_Database_check__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Database_check__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Database_check__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Database_check'", 0);
fail:
  return;
}


static 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[3];
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->compact((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->compact((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_2) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->compact((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_3) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  int arg2 ;
  unsigned int arg3 ;
  int arg4 ;
  zval args[3];
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->compact(arg2,arg3,arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_4) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  int arg2 ;
  unsigned int arg3 ;
  zval args[2];
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->compact(arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_Database_compact__SWIG_5) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  int arg2 ;
  zval args[1];
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->compact(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[4];
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[3], (void **) &arg5, SWIGTYPE_p_Xapian__Compactor, 0) < 0 || arg5 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Compactor for argument 5 of Database_compact");
    return;
  }
  
  {
    try {
      (arg1)->compact((std::string const &)*arg2,arg3,arg4,*arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[4];
  
  arg1 = (Xapian::Database *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[3], (void **) &arg5, SWIGTYPE_p_Xapian__Compactor, 0) < 0 || arg5 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Compactor for argument 5 of Database_compact");
    return;
  }
  
  {
    try {
      (arg1)->compact(arg2,arg3,arg4,*arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianDatabase,compact) {
  int argc;
  zval argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_Database_compact__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_Database_compact__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Database_compact__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_Database_compact__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_Database_compact__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_Database_compact__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(&argv[3], (void**)&tmp, SWIGTYPE_p_Xapian__Compactor, SWIG_POINTER_NO_NULL) >= 0);
          }
          if (_v) {
            _wrap_Database_compact__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[0])) &&
      (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          {
            void *tmp;
            _v = (SWIG_ConvertPtr(&argv[3], (void**)&tmp, SWIGTYPE_p_Xapian__Compactor, SWIG_POINTER_NO_NULL) >= 0);
          }
          if (_v) {
            _wrap_Database_compact__SWIG_7(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'Database_compact'", 0);
fail:
  return;
}




PHP_METHOD(XapianDatabase,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  }
fail:
  return;
}


PHP_METHOD(XapianDatabase,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    RETVAL_NULL();
  }
fail:
  return;
}


PHP_METHOD(XapianDatabase,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    RETVAL_FALSE;
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_new_WritableDatabase__SWIG_0) {
  Xapian::WritableDatabase *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  
fail:
  return;
}


static 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 ;
  
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_WritableDatabase__SWIG_2) {
  std::string *arg1 = 0 ;
  int arg2 ;
  std::string temp1 ;
  zval args[2];
  Xapian::WritableDatabase *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_new_WritableDatabase__SWIG_3) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  Xapian::WritableDatabase *result = 0 ;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  SWIG_SetPointerZval(ZEND_THIS, (void *)result, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,__construct) {
  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 = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_new_WritableDatabase__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_new_WritableDatabase__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_new_WritableDatabase__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'new_WritableDatabase'", 0);
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,add_database) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::WritableDatabase *arg2 = 0 ;
  zval args[1];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__WritableDatabase, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__WritableDatabase for argument 2 of WritableDatabase_add_database");
    return;
  }
  
  {
    try {
      (arg1)->add_database((Xapian::WritableDatabase const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,commit) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->commit();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,flush) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->flush();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_begin_transaction__SWIG_0) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  bool arg2 ;
  zval args[1];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,2,CONVERT_BOOL_IN@*/
  arg2 = (bool) zval_is_true(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->begin_transaction(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_begin_transaction__SWIG_1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->begin_transaction();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,begin_transaction) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 0) {
    _wrap_WritableDatabase_begin_transaction__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
  }
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_TRUE || Z_TYPE(argv[0]) == IS_FALSE || Z_TYPE(argv[0]) == IS_LONG);
    }
    if (_v) {
      _wrap_WritableDatabase_begin_transaction__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'WritableDatabase_begin_transaction'", 0);
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,commit_transaction) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->commit_transaction();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,cancel_transaction) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      (arg1)->cancel_transaction();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,add_document) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::Document *arg2 = 0 ;
  zval args[1];
  Xapian::docid result;
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  if (SWIG_ConvertPtr(&args[0], (void **) &arg2, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg2 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 2 of WritableDatabase_add_document");
    return;
  }
  
  {
    try {
      result = (Xapian::docid)(arg1)->add_document((Xapian::Document const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_delete_document__SWIG_0) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::docid arg2 ;
  zval args[1];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  {
    try {
      (arg1)->delete_document(arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_delete_document__SWIG_1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      (arg1)->delete_document((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,delete_document) {
  int argc;
  zval argv[1];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_WritableDatabase_delete_document__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 1) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      _wrap_WritableDatabase_delete_document__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'WritableDatabase_delete_document'", 0);
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_replace_document__SWIG_0) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::docid arg2 ;
  Xapian::Document *arg3 = 0 ;
  zval args[2];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  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.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (Xapian::docid) zval_get_long(&args[0]);
  /*@SWIG@*/;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 3 of WritableDatabase_replace_document");
    return;
  }
  
  {
    try {
      (arg1)->replace_document(arg2,(Xapian::Document const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static 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[2];
  Xapian::docid result;
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  if (SWIG_ConvertPtr(&args[1], (void **) &arg3, SWIGTYPE_p_Xapian__Document, 0) < 0 || arg3 == NULL) {
    zend_type_error("Expected SWIGTYPE_p_Xapian__Document for argument 3 of WritableDatabase_replace_document");
    return;
  }
  
  {
    try {
      result = (Xapian::docid)(arg1)->replace_document((std::string const &)*arg2,(Xapian::Document const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,replace_document) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__Document, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _wrap_WritableDatabase_replace_document__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    
    _v = (Z_TYPE(argv[0]) == IS_LONG &&
      (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[0])) &&
      (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[0])));
    
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(&argv[1], (void**)&tmp, SWIGTYPE_p_Xapian__Document, SWIG_POINTER_NO_NULL) >= 0);
      }
      if (_v) {
        _wrap_WritableDatabase_replace_document__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'WritableDatabase_replace_document'", 0);
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_add_spelling__SWIG_1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,add_spelling) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_WritableDatabase_add_spelling__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_WritableDatabase_add_spelling__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'WritableDatabase_add_spelling'", 0);
fail:
  return;
}


static 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[2];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (Xapian::termcount) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_remove_spelling__SWIG_1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,remove_spelling) {
  int argc;
  zval argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc, argv);
  if (argc == 1) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_WritableDatabase_remove_spelling__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_WritableDatabase_remove_spelling__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'WritableDatabase_remove_spelling'", 0);
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,add_synonym) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_synonym((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,remove_synonym) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_synonym((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,clear_synonyms) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string temp2 ;
  zval args[1];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->clear_synonyms((std::string const &)*arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,set_metadata) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  zval args[2];
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp2.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg2 = &temp2;
  
  
  convert_to_string(&args[1]);
  temp3.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg3 = &temp3;
  
  {
    try {
      (arg1)->set_metadata((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
fail:
  return;
}


static PHP_METHOD(XapianWritableDatabase,get_description) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string result;
  
  arg1 = (Xapian::WritableDatabase *)SWIG_Z_FETCH_OBJ_P(ZEND_THIS)->ptr;
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = ((Xapian::WritableDatabase const *)arg1)->get_description();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  ZVAL_STRINGL(return_value, (&result)->data(), (&result)->size());
  
fail:
  return;
}




PHP_METHOD(XapianWritableDatabase,__set) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[2];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    arg->newobject = zval_get_long(&args[1]);
  } else {
    PHP_MN(XapianDatabase___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianWritableDatabase,__get) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zval tempZval;
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if (!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_NULL();
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    if(arg->newobject) {
      RETVAL_LONG(1);
    }
    else {
      RETVAL_LONG(0);
    }
  }
  
  else {
    PHP_MN(XapianDatabase___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}


PHP_METHOD(XapianWritableDatabase,__isset) {
  swig_object_wrapper *arg = SWIG_Z_FETCH_OBJ_P(ZEND_THIS);
  zval args[1];
  zend_string *arg2 = 0;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  if(!arg) {
    zend_throw_exception(zend_ce_type_error, "this pointer is NULL", 0);
    return;
  }
  arg2 = Z_STR(args[0]);
  
  if (!arg2) {
    RETVAL_FALSE;
  }
  
  else if (strcmp(ZSTR_VAL(arg2),"thisown") == 0) {
    RETVAL_TRUE;
  }
  
  else {
    PHP_MN(XapianDatabase___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  }
fail:
  return;
}




static ZEND_NAMED_FUNCTION(_wrap_auto_open_stub__SWIG_0) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  Xapian::Database result;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = Xapian::Auto::open_stub((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_auto_open_stub__SWIG_1) {
  std::string *arg1 = 0 ;
  int arg2 ;
  std::string temp1 ;
  zval args[2];
  Xapian::WritableDatabase result;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Auto::open_stub((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static 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 = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_auto_open_stub__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_auto_open_stub__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'auto_open_stub'", 0);
fail:
  return;
}


static PHP_METHOD(Xapian,inmemory_open) {
  PHP_FN(inmemory_open)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_FUNCTION(inmemory_open) {
  Xapian::WritableDatabase result;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = Xapian::InMemory::open();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_chert_open__SWIG_0) {
  std::string *arg1 = 0 ;
  std::string temp1 ;
  zval args[1];
  Xapian::Database result;
  
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  {
    try {
      result = Xapian::Chert::open((std::string const &)*arg1);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (int) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Chert::open((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_chert_open__SWIG_2) {
  std::string *arg1 = 0 ;
  int arg2 ;
  std::string temp1 ;
  zval args[2];
  Xapian::WritableDatabase result;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Chert::open((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static 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 = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _wrap_chert_open__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_chert_open__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[1])) &&
        (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[2])) &&
          (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_chert_open__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'chert_open'", 0);
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (useconds_t) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (useconds_t) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2,SWIG_STD_MOVE(arg3),SWIG_STD_MOVE(arg4));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (useconds_t) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2,SWIG_STD_MOVE(arg3));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
fail:
  return;
}


static ZEND_NAMED_FUNCTION(_wrap_remote_open__SWIG_2) {
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  std::string temp1 ;
  zval args[2];
  Xapian::Database result;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (useconds_t) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (useconds_t) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg5 = (int) zval_get_long(&args[4]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,SWIG_STD_MOVE(arg3),SWIG_STD_MOVE(arg4),arg5);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (useconds_t) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (useconds_t) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,SWIG_STD_MOVE(arg3),SWIG_STD_MOVE(arg4));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (useconds_t) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,SWIG_STD_MOVE(arg3));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg2 = (unsigned int) zval_get_long(&args[1]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (useconds_t) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2,SWIG_STD_MOVE(arg3));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::Database * resultobj = new Xapian::Database(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__Database, 1);
  }
fail:
  return;
}


static 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 = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_remote_open__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_remote_open__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_remote_open__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_remote_open__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[3])) &&
            (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            _wrap_remote_open__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'remote_open'", 0);
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (useconds_t) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg4 = (int) zval_get_long(&args[3]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,SWIG_STD_MOVE(arg3),arg4);
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(args[1]));
  arg2 = &temp2;
  
  
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.OewnmiFhuF/swig/Lib/php/utils.i,6,CONVERT_INT_IN@*/
  arg3 = (useconds_t) zval_get_long(&args[2]);
  /*@SWIG@*/;
  
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,SWIG_STD_MOVE(arg3));
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  {
    Xapian::WritableDatabase * resultobj = new Xapian::WritableDatabase(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static 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;
  
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  convert_to_string(&args[0]);
  temp1.assign(Z_STRVAL(args[0]), Z_STRLEN(args[0]));
  arg1 = &temp1;
  
  
  convert_to_string(&args[1]);
  temp2.assign(Z_STRVAL(args[1]), Z_STRLEN(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(result);
    
    
    
    
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_Xapian__WritableDatabase, 1);
  }
fail:
  return;
}


static 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 = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _wrap_remote_open_writable__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _wrap_remote_open_writable__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_remote_open_writable__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _wrap_remote_open_writable__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      {
        _v = (Z_TYPE(argv[1]) == IS_STRING);
      }
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[3])) &&
            (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            _wrap_remote_open_writable__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[3])) &&
            (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            _wrap_remote_open_writable__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v = 0;
    {
      _v = (Z_TYPE(argv[0]) == IS_STRING);
    }
    if (_v) {
      _v = (Z_TYPE(argv[1]) == IS_LONG &&
        (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[1])) &&
        (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[1])));
      
      if (_v) {
        _v = (Z_TYPE(argv[2]) == IS_LONG &&
          (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[2])) &&
          (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[2])));
        
        if (_v) {
          _v = (Z_TYPE(argv[3]) == IS_LONG &&
            (0 <= ZEND_LONG_MIN || (zend_long)0 <= Z_LVAL(argv[3])) &&
            (UINT_MAX >= ZEND_LONG_MAX || (zend_long)UINT_MAX >= Z_LVAL(argv[3])));
          
          if (_v) {
            _v = (Z_TYPE(argv[4]) == IS_LONG &&
              (INT_MIN <= ZEND_LONG_MIN || (zend_long)INT_MIN <= Z_LVAL(argv[4])) &&
              (INT_MAX >= ZEND_LONG_MAX || (zend_long)INT_MAX >= Z_LVAL(argv[4])));
            
            if (_v) {
              _wrap_remote_open_writable__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU); return;
            }
          }
        }
      }
    }
  }
  
  zend_throw_exception(zend_ce_type_error, "No matching function for overloaded 'remote_open_writable'", 0);
fail:
  return;
}


static PHP_METHOD(Xapian,BAD_VALUENO_get) {
  PHP_FN(BAD_VALUENO_get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_FUNCTION(BAD_VALUENO_get) {
  Xapian::valueno result;
  
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  {
    try {
      result = (Xapian::valueno)Xapian::BAD_VALUENO_get();
    } catch (...) {
      XapianExceptionHandler();
      return;
    }
  }
  
  RETVAL_LONG(result);
  
fail:
  return;
}


/* class object handlers for pointer wrappers */
static zend_object_handlers swig_ptr_object_handlers;

/* Object Creation Method for pointer wrapping class */
static zend_object *swig_ptr_object_new(zend_class_entry *ce) {
  swig_object_wrapper *obj = (swig_object_wrapper*)zend_object_alloc(sizeof(swig_object_wrapper), ce);
  zend_object_std_init(&obj->std, ce);
  object_properties_init(&obj->std, ce);
  obj->std.handlers = &swig_ptr_object_handlers;
  obj->newobject = 0;
  return &obj->std;
}

/* Implement __toString equivalent, since that worked for the old-style resource wrapped pointers. */
#if PHP_MAJOR_VERSION > 8 || PHP_MINOR_VERSION >= 2
static ZEND_RESULT_CODE swig_ptr_cast_object(zend_object *zobj, zval *retval, int type) {
#else
static int swig_ptr_cast_object(zend_object *zobj, zval *retval, int type) {
#endif
  if (type == IS_STRING) {
    swig_object_wrapper *obj = swig_php_fetch_object(zobj);
    ZVAL_NEW_STR(retval, zend_strpprintf(0, "SWIGPointer(%p,owned=%d)", obj->ptr, obj->newobject));
    return SUCCESS;
  }
  return FAILURE;
}

/* end wrapper section */
/* arginfo subsection */
ZEND_BEGIN_ARG_INFO_EX(swig_magic_arginfo_get, 0, 0, 1)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_magic_arginfo_set, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_INFO(0,arg2)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_magic_arginfo_isset, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_BAD_VALUENO_get, 0, 0, MAY_BE_LONG)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_auto_open_stub, 0, 2, XapianDatabase, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_chert_open, 0, 2, XapianDatabase, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_inmemory_open, 0, 0, XapianWritableDatabase, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_major_version swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_metres_to_miles, 0, 1, MAY_BE_DOUBLE)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_miles_to_metres swig_arginfo_metres_to_miles
#define swig_arginfo_minor_version swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_remote_open, 0, 2, XapianDatabase, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_remote_open_writable, 0, 2, XapianWritableDatabase, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg5,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_revision swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_sortable_serialise, 0, 1, MAY_BE_STRING)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_sortable_unserialise, 0, 1, MAY_BE_DOUBLE)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_version_string, 0, 0, MAY_BE_NULL|MAY_BE_STRING)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_BB2Weight, 0, 0, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Weight_get_maxextra, 0, 0, MAY_BE_DOUBLE)
ZEND_END_ARG_INFO()
#define swig_arginfo_BB2Weight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_Weight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_BB2Weight_get_maxpart swig_arginfo_Weight_get_maxextra
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Weight_get_sumextra, 0, 2, MAY_BE_DOUBLE)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_BB2Weight_get_sumextra swig_arginfo_Weight_get_sumextra
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Weight_get_sumpart, 0, 3, MAY_BE_DOUBLE)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_BB2Weight_get_sumpart swig_arginfo_Weight_get_sumpart
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Weight_name, 0, 0, MAY_BE_STRING)
ZEND_END_ARG_INFO()
#define swig_arginfo_BB2Weight_name swig_arginfo_Weight_name
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_BM25PlusWeight, 0, 0, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg5,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg6,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_BM25PlusWeight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_BM25PlusWeight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_BM25PlusWeight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_BM25PlusWeight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_BM25PlusWeight_name swig_arginfo_Weight_name
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_BM25Weight, 0, 0, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg5,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_BM25Weight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_BM25Weight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_BM25Weight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_BM25Weight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_BM25Weight_name swig_arginfo_Weight_name
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_BoolWeight, 0, 0, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_BoolWeight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_BoolWeight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_BoolWeight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_BoolWeight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_BoolWeight_name swig_arginfo_Weight_name
#define swig_arginfo_new_Compactor swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Compactor_add_source, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Compactor_compact, 0, 0, MAY_BE_VOID)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_Compactor_resolve_duplicate_metadata, 0, 0, 3)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg3,XapianSWIG\\_p_std__string,MAY_BE_NULL,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Compactor_set_block_size, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Compactor_set_compaction_level swig_arginfo_Compactor_set_block_size
#define swig_arginfo_Compactor_set_destdir swig_arginfo_Compactor_add_source
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Compactor_set_multipass, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_BOOL,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Compactor_set_renumber swig_arginfo_Compactor_set_multipass
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_Compactor_set_status, 0, 0, 2)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_CoordWeight swig_arginfo_new_BoolWeight
#define swig_arginfo_CoordWeight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_CoordWeight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_CoordWeight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_CoordWeight_get_sumpart swig_arginfo_Weight_get_sumpart
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_CoordWeight_init, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_CoordWeight_name swig_arginfo_Weight_name
#define swig_arginfo_new_DLHWeight swig_arginfo_new_BoolWeight
#define swig_arginfo_DLHWeight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_DLHWeight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_DLHWeight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_DLHWeight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_DLHWeight_name swig_arginfo_Weight_name
#define swig_arginfo_new_DPHWeight swig_arginfo_new_BoolWeight
#define swig_arginfo_DPHWeight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_DPHWeight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_DPHWeight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_DPHWeight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_DPHWeight_name swig_arginfo_Weight_name
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_Database, 0, 0, 1)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Database_add_database, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianDatabase,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Database_allterms_begin, 0, 0, XapianTermIterator, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_allterms_end swig_arginfo_Database_allterms_begin
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Database_check, 0, 1, MAY_BE_LONG)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_close swig_arginfo_Compactor_compact
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Database_compact, 0, 4, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg4,XapianCompactor,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_get_average_length swig_arginfo_Weight_get_maxextra
#define swig_arginfo_Database_get_avlength swig_arginfo_Weight_get_maxextra
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Database_get_collection_freq, 0, 1, MAY_BE_LONG)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_get_description swig_arginfo_Weight_name
#define swig_arginfo_Database_get_doccount swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Database_get_doclength, 0, 1, MAY_BE_LONG)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_get_doclength_lower_bound swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_Database_get_doclength_upper_bound swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Database_get_document, 0, 2, XapianDocument, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_get_lastdocid swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Database_get_metadata, 0, 1, MAY_BE_STRING)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_get_revision swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Database_get_spelling_suggestion, 0, 1, MAY_BE_STRING)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_get_termfreq swig_arginfo_Database_get_collection_freq
#define swig_arginfo_Database_get_total_length swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_Database_get_unique_terms swig_arginfo_Database_get_doclength
#define swig_arginfo_Database_get_uuid swig_arginfo_Weight_name
#define swig_arginfo_Database_get_value_freq swig_arginfo_Database_get_doclength
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Database_get_value_lower_bound, 0, 1, MAY_BE_STRING)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_get_value_upper_bound swig_arginfo_Database_get_value_lower_bound
#define swig_arginfo_Database_get_wdf_upper_bound swig_arginfo_Database_get_collection_freq
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Database_has_positions, 0, 0, MAY_BE_BOOL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_keep_alive swig_arginfo_Compactor_compact
#define swig_arginfo_Database_locked swig_arginfo_Database_has_positions
#define swig_arginfo_Database_metadata_keys_begin swig_arginfo_Database_allterms_begin
#define swig_arginfo_Database_metadata_keys_end swig_arginfo_Database_allterms_begin
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Database_positionlist_begin, 0, 2, XapianPositionIterator, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_positionlist_end swig_arginfo_Database_positionlist_begin
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Database_postlist_begin, 0, 1, XapianPostingIterator, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_postlist_end swig_arginfo_Database_postlist_begin
#define swig_arginfo_Database_reopen swig_arginfo_Database_has_positions
#define swig_arginfo_Database_size swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Database_spellings_begin, 0, 0, XapianTermIterator, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_spellings_end swig_arginfo_Database_spellings_begin
#define swig_arginfo_Database_synonym_keys_begin swig_arginfo_Database_allterms_begin
#define swig_arginfo_Database_synonym_keys_end swig_arginfo_Database_allterms_begin
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Database_synonyms_begin, 0, 1, XapianTermIterator, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_synonyms_end swig_arginfo_Database_synonyms_begin
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Database_term_exists, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Database_termlist_begin, 0, 1, XapianTermIterator, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_termlist_end swig_arginfo_Database_termlist_begin
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Database_valuestream_begin, 0, 1, XapianValueIterator, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Database_valuestream_end swig_arginfo_Database_valuestream_begin
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_DateRangeProcessor, 0, 0, 2)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_RangeProcessor_apply swig_arginfo_Compactor_set_status
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_DateRangeProcessor_apply, 0, 2, XapianQuery, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_DateValueRangeProcessor, 0, 0, 2)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_BOOL|MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_BOOL|MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_BOOL,NULL)
 ZEND_ARG_TYPE_MASK(0,arg5,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_ValueRangeProcessor_apply, 0, 0, 2)
 ZEND_ARG_TYPE_MASK(1,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(1,arg2,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_StringValueRangeProcessor_apply, 0, 2, MAY_BE_LONG)
 ZEND_ARG_TYPE_MASK(1,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(1,arg2,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_DateValueRangeProcessor_apply swig_arginfo_StringValueRangeProcessor_apply
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_DecreasingValueWeightPostingSource, 0, 0, 1)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_PostingSource_check, 0, 0, 2)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ValuePostingSource_check swig_arginfo_PostingSource_check
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_DecreasingValueWeightPostingSource_check, 0, 2, MAY_BE_BOOL)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_PostingSource_get_description swig_arginfo_new_BoolWeight
#define swig_arginfo_ValueWeightPostingSource_get_description swig_arginfo_new_BoolWeight
#define swig_arginfo_DecreasingValueWeightPostingSource_get_description swig_arginfo_Weight_name
#define swig_arginfo_PostingSource_get_weight swig_arginfo_new_BoolWeight
#define swig_arginfo_ValueWeightPostingSource_get_weight swig_arginfo_new_BoolWeight
#define swig_arginfo_DecreasingValueWeightPostingSource_get_weight swig_arginfo_Weight_get_maxextra
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_PostingSource_init, 0, 0, 1)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianDatabase,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ValuePostingSource_init swig_arginfo_PostingSource_init
#define swig_arginfo_ValueWeightPostingSource_init swig_arginfo_PostingSource_init
#define swig_arginfo_DecreasingValueWeightPostingSource_init swig_arginfo_Database_add_database
#define swig_arginfo_PostingSource_name swig_arginfo_new_BoolWeight
#define swig_arginfo_ValueWeightPostingSource_name swig_arginfo_new_BoolWeight
#define swig_arginfo_DecreasingValueWeightPostingSource_name swig_arginfo_Weight_name
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_PostingSource_next, 0, 0, 1)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ValuePostingSource_next swig_arginfo_PostingSource_next
#define swig_arginfo_DecreasingValueWeightPostingSource_next swig_arginfo_CoordWeight_init
#define swig_arginfo_PostingSource_skip_to swig_arginfo_PostingSource_check
#define swig_arginfo_ValuePostingSource_skip_to swig_arginfo_PostingSource_check
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_DecreasingValueWeightPostingSource_skip_to, 0, 2, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_Document swig_arginfo_new_BoolWeight
#define swig_arginfo_Document_add_boolean_term swig_arginfo_Compactor_add_source
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Document_add_posting, 0, 2, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Document_add_term, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Document_add_value, 0, 2, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Document_clear_terms swig_arginfo_Compactor_compact
#define swig_arginfo_Document_clear_values swig_arginfo_Compactor_compact
#define swig_arginfo_Document_get_data swig_arginfo_Weight_name
#define swig_arginfo_Document_get_description swig_arginfo_Weight_name
#define swig_arginfo_Document_get_docid swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_Document_get_value swig_arginfo_Database_get_value_lower_bound
#define swig_arginfo_Document_remove_posting swig_arginfo_Document_add_posting
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Document_remove_postings, 0, 3, MAY_BE_LONG)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Document_remove_term swig_arginfo_Compactor_add_source
#define swig_arginfo_Document_remove_value swig_arginfo_Compactor_set_block_size
#define swig_arginfo_Document_serialise swig_arginfo_Weight_name
#define swig_arginfo_Document_set_data swig_arginfo_Compactor_add_source
#define swig_arginfo_Document_termlist_begin swig_arginfo_Database_spellings_begin
#define swig_arginfo_Document_termlist_count swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_Document_termlist_end swig_arginfo_Database_spellings_begin
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Document_unserialise, 0, 1, XapianDocument, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Document_values_begin, 0, 0, XapianValueIterator, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_Document_values_count swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_Document_values_end swig_arginfo_Document_values_begin
#define swig_arginfo_new_ESet swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_ESet_back, 0, 0, XapianESetIterator, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_ESet_begin swig_arginfo_ESet_back
#define swig_arginfo_ESet_end swig_arginfo_ESet_back
#define swig_arginfo_ESet_get_description swig_arginfo_Weight_name
#define swig_arginfo_ESet_get_ebound swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_ESet_is_empty swig_arginfo_Database_has_positions
#define swig_arginfo_ESet_size swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_new_ESetIterator swig_arginfo_new_BoolWeight
#define swig_arginfo_ESetIterator_current swig_arginfo_Weight_name
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_ESetIterator_equals, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianESetIterator,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_ESetIterator_eset_get, 0, 0, XapianESet, MAY_BE_NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_ESetIterator_eset_set, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianESet,MAY_BE_NULL,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ESetIterator_get_description swig_arginfo_Weight_name
#define swig_arginfo_ESetIterator_get_term swig_arginfo_Weight_name
#define swig_arginfo_ESetIterator_get_weight swig_arginfo_Weight_get_maxextra
#define swig_arginfo_ESetIterator_key swig_arginfo_ESet_back
#define swig_arginfo_ESetIterator_next swig_arginfo_Compactor_compact
#define swig_arginfo_ESetIterator_off_from_end_get swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_ESetIterator_off_from_end_set swig_arginfo_Compactor_set_block_size
#define swig_arginfo_ESetIterator_prev swig_arginfo_Compactor_compact
#define swig_arginfo_ESetIterator_rewind swig_arginfo_Compactor_compact
#define swig_arginfo_ESetIterator_valid swig_arginfo_Database_has_positions
#define swig_arginfo_new_Enquire swig_arginfo_PostingSource_init
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Enquire_add_matchspy, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianMatchSpy,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Enquire_clear_matchspies swig_arginfo_Compactor_compact
#define swig_arginfo_Enquire_get_description swig_arginfo_Weight_name
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Enquire_get_eset, 0, 4, XapianESet, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianRSet,0,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg3,XapianExpandDecider,MAY_BE_LONG|MAY_BE_NULL,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg4,XapianExpandDecider,MAY_BE_DOUBLE|MAY_BE_NULL,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg5,XapianExpandDecider,MAY_BE_DOUBLE|MAY_BE_NULL,NULL)
 ZEND_ARG_TYPE_MASK(0,arg6,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Enquire_get_matching_terms, 0, 1, MAY_BE_ARRAY)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianMSetIterator,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Enquire_get_matching_terms_begin, 0, 1, XapianTermIterator, 0)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianMSetIterator,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Enquire_get_matching_terms_end swig_arginfo_Enquire_get_matching_terms_begin
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Enquire_get_mset, 0, 3, XapianMSet, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg3,XapianRSet,MAY_BE_LONG|MAY_BE_NULL,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg4,XapianMatchDecider|XapianRSet,MAY_BE_NULL,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg5,XapianMatchDecider,MAY_BE_NULL,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Enquire_get_query, 0, 0, XapianQuery, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Enquire_set_collapse_key, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Enquire_set_cutoff, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Enquire_set_docid_order swig_arginfo_Compactor_set_block_size
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Enquire_set_expansion_scheme, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Enquire_set_query, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianQuery,0,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Enquire_set_sort_by_key, 0, 2, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianKeyMaker,0,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_BOOL,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Enquire_set_sort_by_key_then_relevance swig_arginfo_Enquire_set_sort_by_key
#define swig_arginfo_Enquire_set_sort_by_relevance swig_arginfo_Compactor_compact
#define swig_arginfo_Enquire_set_sort_by_relevance_then_key swig_arginfo_Enquire_set_sort_by_key
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Enquire_set_sort_by_relevance_then_value, 0, 2, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_BOOL,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Enquire_set_sort_by_value swig_arginfo_Enquire_set_sort_by_relevance_then_value
#define swig_arginfo_Enquire_set_sort_by_value_then_relevance swig_arginfo_Enquire_set_sort_by_relevance_then_value
#define swig_arginfo_Enquire_set_time_limit swig_arginfo_CoordWeight_init
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Enquire_set_weighting_scheme, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianWeight,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_ExpandDecider swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_ExpandDecider_apply, 0, 0, 1)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_ExpandDecider_release, 0, 0, XapianExpandDecider, MAY_BE_NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_ExpandDeciderAnd, 0, 0, 2)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianExpandDecider,0,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianExpandDecider,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ExpandDeciderAnd_apply swig_arginfo_Database_term_exists
#define swig_arginfo_new_ExpandDeciderFilterPrefix swig_arginfo_ExpandDecider_apply
#define swig_arginfo_ExpandDeciderFilterPrefix_apply swig_arginfo_Database_term_exists
#define swig_arginfo_new_FieldProcessor swig_arginfo_new_BoolWeight
#define swig_arginfo_FieldProcessor_apply swig_arginfo_ExpandDecider_apply
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_FieldProcessor_release, 0, 0, XapianFieldProcessor, MAY_BE_NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_FixedWeightPostingSource swig_arginfo_PostingSource_next
#define swig_arginfo_PostingSource_at_end swig_arginfo_new_BoolWeight
#define swig_arginfo_FixedWeightPostingSource_at_end swig_arginfo_Database_has_positions
#define swig_arginfo_FixedWeightPostingSource_check swig_arginfo_DecreasingValueWeightPostingSource_check
#define swig_arginfo_FixedWeightPostingSource_get_description swig_arginfo_Weight_name
#define swig_arginfo_PostingSource_get_docid swig_arginfo_new_BoolWeight
#define swig_arginfo_FixedWeightPostingSource_get_docid swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_PostingSource_get_termfreq_est swig_arginfo_new_BoolWeight
#define swig_arginfo_FixedWeightPostingSource_get_termfreq_est swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_PostingSource_get_termfreq_max swig_arginfo_new_BoolWeight
#define swig_arginfo_FixedWeightPostingSource_get_termfreq_max swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_PostingSource_get_termfreq_min swig_arginfo_new_BoolWeight
#define swig_arginfo_FixedWeightPostingSource_get_termfreq_min swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_FixedWeightPostingSource_get_weight swig_arginfo_Weight_get_maxextra
#define swig_arginfo_FixedWeightPostingSource_init swig_arginfo_Database_add_database
#define swig_arginfo_FixedWeightPostingSource_name swig_arginfo_Weight_name
#define swig_arginfo_FixedWeightPostingSource_next swig_arginfo_CoordWeight_init
#define swig_arginfo_FixedWeightPostingSource_skip_to swig_arginfo_DecreasingValueWeightPostingSource_skip_to
#define swig_arginfo_new_GreatCircleMetric swig_arginfo_PostingSource_next
#define swig_arginfo_LatLongMetric_name swig_arginfo_new_BoolWeight
#define swig_arginfo_GreatCircleMetric_name swig_arginfo_Weight_name
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_LatLongMetric_pointwise_distance, 0, 0, 2)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianLatLongCoord,0,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianLatLongCoord,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_GreatCircleMetric_pointwise_distance, 0, 2, MAY_BE_DOUBLE)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianLatLongCoord,0,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianLatLongCoord,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_IfB2Weight swig_arginfo_new_BB2Weight
#define swig_arginfo_IfB2Weight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_IfB2Weight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_IfB2Weight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_IfB2Weight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_IfB2Weight_name swig_arginfo_Weight_name
#define swig_arginfo_new_InL2Weight swig_arginfo_new_BB2Weight
#define swig_arginfo_InL2Weight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_InL2Weight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_InL2Weight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_InL2Weight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_InL2Weight_name swig_arginfo_Weight_name
#define swig_arginfo_new_IneB2Weight swig_arginfo_new_BB2Weight
#define swig_arginfo_IneB2Weight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_IneB2Weight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_IneB2Weight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_IneB2Weight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_IneB2Weight_name swig_arginfo_Weight_name
#define swig_arginfo_new_KeyMaker swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_KeyMaker_apply, 0, 0, 1)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianDocument,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_KeyMaker_release, 0, 0, XapianKeyMaker, MAY_BE_NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_LMWeight, 0, 0, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_LMWeight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_LMWeight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_LMWeight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_LMWeight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_LMWeight_name swig_arginfo_Weight_name
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_LatLongCoord, 0, 0, 2)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_LatLongCoord_get_description swig_arginfo_Weight_name
#define swig_arginfo_LatLongCoord_latitude_get swig_arginfo_Weight_get_maxextra
#define swig_arginfo_LatLongCoord_latitude_set swig_arginfo_CoordWeight_init
#define swig_arginfo_LatLongCoord_longitude_get swig_arginfo_Weight_get_maxextra
#define swig_arginfo_LatLongCoord_longitude_set swig_arginfo_CoordWeight_init
#define swig_arginfo_LatLongCoord_serialise swig_arginfo_Weight_name
#define swig_arginfo_LatLongCoord_unserialise swig_arginfo_Compactor_add_source
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_LatLongCoords, 0, 0, 1)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianLatLongCoord,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_LatLongCoords_append, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianLatLongCoord,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_LatLongCoords_begin, 0, 0, XapianLatLongCoordsIterator, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_LatLongCoords_end swig_arginfo_LatLongCoords_begin
#define swig_arginfo_LatLongCoords_get_description swig_arginfo_Weight_name
#define swig_arginfo_LatLongCoords_is_empty swig_arginfo_Database_has_positions
#define swig_arginfo_LatLongCoords_serialise swig_arginfo_Weight_name
#define swig_arginfo_LatLongCoords_size swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_LatLongCoords_unserialise swig_arginfo_Compactor_add_source
#define swig_arginfo_new_LatLongCoordsIterator swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_LatLongCoordsIterator_equals, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianLatLongCoordsIterator,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_LatLongCoordsIterator_get_coord, 0, 0, XapianLatLongCoord, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_LatLongCoordsIterator_next swig_arginfo_Compactor_compact
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_LatLongDistanceKeyMaker, 0, 0, 2)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianLatLongCoord|XapianLatLongCoords,0,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg3,XapianLatLongMetric,0,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_LatLongDistanceKeyMaker_apply, 0, 1, MAY_BE_STRING)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianDocument,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_LatLongDistancePostingSource, 0, 0, 2)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianLatLongCoords,0,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg3,XapianLatLongMetric,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg5,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg6,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_LatLongDistancePostingSource_check swig_arginfo_DecreasingValueWeightPostingSource_check
#define swig_arginfo_LatLongDistancePostingSource_get_description swig_arginfo_Weight_name
#define swig_arginfo_LatLongDistancePostingSource_get_weight swig_arginfo_Weight_get_maxextra
#define swig_arginfo_LatLongDistancePostingSource_init swig_arginfo_Database_add_database
#define swig_arginfo_LatLongDistancePostingSource_name swig_arginfo_Weight_name
#define swig_arginfo_LatLongDistancePostingSource_next swig_arginfo_CoordWeight_init
#define swig_arginfo_LatLongDistancePostingSource_skip_to swig_arginfo_DecreasingValueWeightPostingSource_skip_to
#define swig_arginfo_new_LatLongMetric swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_LatLongMetric_apply, 0, 3, MAY_BE_DOUBLE)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianLatLongCoords,0,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianLatLongCoords,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_MSet swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_MSet_back, 0, 0, XapianMSetIterator, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_MSet_begin swig_arginfo_MSet_back
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_MSet_convert_to_percent, 0, 1, MAY_BE_LONG)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianMSetIterator,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_MSet_end swig_arginfo_MSet_back
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_MSet_fetch, 0, 0, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianMSetIterator,0,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianMSetIterator,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_MSet_get_description swig_arginfo_Weight_name
#define swig_arginfo_MSet_get_docid swig_arginfo_Database_get_doclength
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_MSet_get_document, 0, 1, XapianDocument, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_MSet_get_document_percentage swig_arginfo_Database_get_doclength
#define swig_arginfo_MSet_get_firstitem swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_MSet_get_hit, 0, 1, XapianMSetIterator, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_MSet_get_matches_estimated swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_MSet_get_matches_lower_bound swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_MSet_get_matches_upper_bound swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_MSet_get_max_attained swig_arginfo_Weight_get_maxextra
#define swig_arginfo_MSet_get_max_possible swig_arginfo_Weight_get_maxextra
#define swig_arginfo_MSet_get_termfreq swig_arginfo_Database_get_collection_freq
#define swig_arginfo_MSet_get_termweight swig_arginfo_sortable_unserialise
#define swig_arginfo_MSet_get_uncollapsed_matches_estimated swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_MSet_get_uncollapsed_matches_lower_bound swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_MSet_get_uncollapsed_matches_upper_bound swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_MSet_is_empty swig_arginfo_Database_has_positions
#define swig_arginfo_MSet_size swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_MSet_snippet, 0, 1, MAY_BE_STRING)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg3,XapianStem,0,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg5,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg6,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg7,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_MSetIterator swig_arginfo_new_BoolWeight
#define swig_arginfo_MSetIterator_current swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_MSetIterator_equals, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianMSetIterator,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_MSetIterator_get_collapse_count swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_MSetIterator_get_collapse_key swig_arginfo_Weight_name
#define swig_arginfo_MSetIterator_get_description swig_arginfo_Weight_name
#define swig_arginfo_MSetIterator_get_docid swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_MSetIterator_get_document, 0, 0, XapianDocument, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_MSetIterator_get_percent swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_MSetIterator_get_rank swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_MSetIterator_get_sort_key swig_arginfo_Weight_name
#define swig_arginfo_MSetIterator_get_weight swig_arginfo_Weight_get_maxextra
#define swig_arginfo_MSetIterator_key swig_arginfo_MSet_back
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_MSetIterator_mset_get, 0, 0, XapianMSet, MAY_BE_NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_MSetIterator_mset_set, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianMSet,MAY_BE_NULL,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_MSetIterator_next swig_arginfo_Compactor_compact
#define swig_arginfo_MSetIterator_off_from_end_get swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_MSetIterator_off_from_end_set swig_arginfo_Compactor_set_block_size
#define swig_arginfo_MSetIterator_prev swig_arginfo_Compactor_compact
#define swig_arginfo_MSetIterator_rewind swig_arginfo_Compactor_compact
#define swig_arginfo_MSetIterator_valid swig_arginfo_Database_has_positions
#define swig_arginfo_new_MatchDecider swig_arginfo_new_BoolWeight
#define swig_arginfo_MatchDecider_apply swig_arginfo_KeyMaker_apply
#define swig_arginfo_new_MatchSpy swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_MatchSpy_apply, 0, 0, 2)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianDocument,0,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_MatchSpy_get_description swig_arginfo_new_BoolWeight
#define swig_arginfo_MatchSpy_merge_results swig_arginfo_ExpandDecider_apply
#define swig_arginfo_MatchSpy_name swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_MatchSpy_release, 0, 0, XapianMatchSpy, MAY_BE_NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_MultiValueKeyMaker swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_MultiValueKeyMaker_add_value, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_BOOL,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_MultiValueKeyMaker_apply swig_arginfo_LatLongDistanceKeyMaker_apply
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_NumberRangeProcessor, 0, 0, 1)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_NumberRangeProcessor_apply swig_arginfo_DateRangeProcessor_apply
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_NumberValueRangeProcessor, 0, 0, 2)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_BOOL,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_NumberValueRangeProcessor_apply swig_arginfo_StringValueRangeProcessor_apply
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_PL2PlusWeight, 0, 0, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_DOUBLE,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_PL2PlusWeight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_PL2PlusWeight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_PL2PlusWeight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_PL2PlusWeight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_PL2PlusWeight_name swig_arginfo_Weight_name
#define swig_arginfo_new_PL2Weight swig_arginfo_new_BB2Weight
#define swig_arginfo_PL2Weight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_PL2Weight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_PL2Weight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_PL2Weight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_PL2Weight_name swig_arginfo_Weight_name
#define swig_arginfo_new_PositionIterator swig_arginfo_new_BoolWeight
#define swig_arginfo_PositionIterator_current swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_PositionIterator_equals, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianPositionIterator,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_PositionIterator_get_description swig_arginfo_Weight_name
#define swig_arginfo_PositionIterator_get_termpos swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_PositionIterator_key, 0, 0, XapianPositionIterator, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_PositionIterator_next swig_arginfo_Compactor_compact
#define swig_arginfo_PositionIterator_rewind swig_arginfo_Compactor_compact
#define swig_arginfo_PositionIterator_skip_to swig_arginfo_Compactor_set_block_size
#define swig_arginfo_PositionIterator_valid swig_arginfo_Database_has_positions
#define swig_arginfo_new_PostingIterator swig_arginfo_new_BoolWeight
#define swig_arginfo_PostingIterator_current swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_PostingIterator_equals, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianPostingIterator,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_PostingIterator_get_description swig_arginfo_Weight_name
#define swig_arginfo_PostingIterator_get_docid swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_PostingIterator_get_doclength swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_PostingIterator_get_unique_terms swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_PostingIterator_get_wdf swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_PostingIterator_key, 0, 0, XapianPostingIterator, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_PostingIterator_next swig_arginfo_Compactor_compact
#define swig_arginfo_PostingIterator_positionlist_begin swig_arginfo_PositionIterator_key
#define swig_arginfo_PostingIterator_positionlist_end swig_arginfo_PositionIterator_key
#define swig_arginfo_PostingIterator_rewind swig_arginfo_Compactor_compact
#define swig_arginfo_PostingIterator_skip_to swig_arginfo_Compactor_set_block_size
#define swig_arginfo_PostingIterator_valid swig_arginfo_Database_has_positions
#define swig_arginfo_new_PostingSource swig_arginfo_new_BoolWeight
#define swig_arginfo_PostingSource_get_maxweight swig_arginfo_Weight_get_maxextra
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_PostingSource_release, 0, 0, XapianPostingSource, MAY_BE_NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_PostingSource_set_maxweight swig_arginfo_CoordWeight_init
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Query_MatchAll_get, 0, 0, XapianQuery, MAY_BE_NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Query_MatchNothing_get swig_arginfo_Query_MatchAll_get
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_Query, 0, 0, 1)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianPostingSource,MAY_BE_DOUBLE|MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianQuery,MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg3,XapianQuery,MAY_BE_DOUBLE|MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg4,MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg5,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Query_get_description swig_arginfo_Weight_name
#define swig_arginfo_Query_get_length swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_Query_get_num_subqueries swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Query_get_subquery, 0, 1, XapianQuery, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Query_get_terms_begin swig_arginfo_Database_spellings_begin
#define swig_arginfo_Query_get_terms_end swig_arginfo_Database_spellings_begin
#define swig_arginfo_Query_get_type swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_Query_get_unique_terms_begin swig_arginfo_Database_spellings_begin
#define swig_arginfo_Query_get_unique_terms_end swig_arginfo_Database_spellings_begin
#define swig_arginfo_Query_is_empty swig_arginfo_Database_has_positions
#define swig_arginfo_Query_serialise swig_arginfo_Weight_name
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Query_unserialise, 0, 1, XapianQuery, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianRegistry,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_QueryParser swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_QueryParser_add_boolean_prefix, 0, 3, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianFieldProcessor,MAY_BE_STRING,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg3,XapianSWIG\\_p_std__string,MAY_BE_BOOL|MAY_BE_NULL,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_QueryParser_add_prefix, 0, 2, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianFieldProcessor,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_QueryParser_add_rangeprocessor, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianRangeProcessor,0,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianSWIG\\_p_std__string,MAY_BE_NULL,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_QueryParser_add_valuerangeprocessor, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianValueRangeProcessor,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_QueryParser_get_corrected_query_string swig_arginfo_Weight_name
#define swig_arginfo_QueryParser_get_default_op swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_QueryParser_get_description swig_arginfo_Weight_name
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_QueryParser_parse_query, 0, 1, XapianQuery, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_QueryParser_set_database swig_arginfo_Database_add_database
#define swig_arginfo_QueryParser_set_default_op swig_arginfo_Compactor_set_block_size
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_QueryParser_set_max_expansion, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_QueryParser_set_max_wildcard_expansion swig_arginfo_Compactor_set_block_size
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_QueryParser_set_stemmer, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianStem,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_QueryParser_set_stemming_strategy swig_arginfo_Compactor_set_block_size
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_QueryParser_set_stopper, 0, 0, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianStopper,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_QueryParser_stoplist_begin swig_arginfo_Database_spellings_begin
#define swig_arginfo_QueryParser_stoplist_end swig_arginfo_Database_spellings_begin
#define swig_arginfo_QueryParser_unstem_begin swig_arginfo_Database_synonyms_begin
#define swig_arginfo_QueryParser_unstem_end swig_arginfo_Database_synonyms_begin
#define swig_arginfo_new_RSet swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_RSet_add_document, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianMSetIterator,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_RSet_contains, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianMSetIterator,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_RSet_get_description swig_arginfo_Weight_name
#define swig_arginfo_RSet_is_empty swig_arginfo_Database_has_positions
#define swig_arginfo_RSet_remove_document swig_arginfo_RSet_add_document
#define swig_arginfo_RSet_size swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_new_RangeProcessor swig_arginfo_new_NumberRangeProcessor
#define swig_arginfo_RangeProcessor_check_range swig_arginfo_DateRangeProcessor_apply
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_RangeProcessor_release, 0, 0, XapianRangeProcessor, MAY_BE_NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_Registry swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Registry_get_lat_long_metric, 0, 1, XapianLatLongMetric, MAY_BE_NULL)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Registry_get_match_spy, 0, 1, XapianMatchSpy, MAY_BE_NULL)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Registry_get_posting_source, 0, 1, XapianPostingSource, MAY_BE_NULL)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Registry_get_weighting_scheme, 0, 1, XapianWeight, MAY_BE_NULL)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Registry_register_lat_long_metric, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianLatLongMetric,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Registry_register_match_spy swig_arginfo_Enquire_add_matchspy
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_Registry_register_posting_source, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianPostingSource,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Registry_register_weighting_scheme swig_arginfo_Enquire_set_weighting_scheme
#define swig_arginfo_new_SimpleStopper swig_arginfo_ExpandDecider_apply
#define swig_arginfo_SimpleStopper_add swig_arginfo_Compactor_add_source
#define swig_arginfo_Stopper_apply swig_arginfo_ExpandDecider_apply
#define swig_arginfo_SimpleStopper_apply swig_arginfo_Database_term_exists
#define swig_arginfo_Stopper_get_description swig_arginfo_new_BoolWeight
#define swig_arginfo_SimpleStopper_get_description swig_arginfo_Weight_name
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_Stem, 0, 0, 1)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianStemImplementation,MAY_BE_NULL|MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_BOOL,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_Stem_apply swig_arginfo_Database_get_metadata
#define swig_arginfo_Stem_get_available_languages swig_arginfo_Weight_name
#define swig_arginfo_Stem_get_description swig_arginfo_Weight_name
#define swig_arginfo_Stem_is_none swig_arginfo_Database_has_positions
#define swig_arginfo_new_StemImplementation swig_arginfo_new_BoolWeight
#define swig_arginfo_StemImplementation_apply swig_arginfo_ExpandDecider_apply
#define swig_arginfo_StemImplementation_get_description swig_arginfo_new_BoolWeight
#define swig_arginfo_new_Stopper swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_Stopper_release, 0, 0, XapianStopper, MAY_BE_NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_new_StringValueRangeProcessor swig_arginfo_new_NumberValueRangeProcessor
#define swig_arginfo_new_TermGenerator swig_arginfo_new_BoolWeight
#define swig_arginfo_TermGenerator_get_description swig_arginfo_Weight_name
#define swig_arginfo_TermGenerator_get_document swig_arginfo_MSetIterator_get_document
#define swig_arginfo_TermGenerator_get_termpos swig_arginfo_BAD_VALUENO_get
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_TermGenerator_increase_termpos, 0, 0, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_TermGenerator_index_text, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_TermGenerator_index_text_without_positions swig_arginfo_TermGenerator_index_text
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_TermGenerator_set_database, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianWritableDatabase,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_TermGenerator_set_document, 0, 1, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianDocument,0,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_TermGenerator_set_flags, 0, 1, MAY_BE_LONG)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_TermGenerator_set_max_word_length swig_arginfo_Compactor_set_block_size
#define swig_arginfo_TermGenerator_set_stemmer swig_arginfo_QueryParser_set_stemmer
#define swig_arginfo_TermGenerator_set_stemming_strategy swig_arginfo_Compactor_set_block_size
#define swig_arginfo_TermGenerator_set_stopper swig_arginfo_QueryParser_set_stopper
#define swig_arginfo_TermGenerator_set_stopper_strategy swig_arginfo_Compactor_set_block_size
#define swig_arginfo_TermGenerator_set_termpos swig_arginfo_Compactor_set_block_size
#define swig_arginfo_new_TermIterator swig_arginfo_new_BoolWeight
#define swig_arginfo_TermIterator_current swig_arginfo_Weight_name
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_TermIterator_equals, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianTermIterator,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_TermIterator_get_description swig_arginfo_Weight_name
#define swig_arginfo_TermIterator_get_term swig_arginfo_Weight_name
#define swig_arginfo_TermIterator_get_termfreq swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_TermIterator_get_wdf swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_TermIterator_key swig_arginfo_Database_spellings_begin
#define swig_arginfo_TermIterator_next swig_arginfo_Compactor_compact
#define swig_arginfo_TermIterator_positionlist_begin swig_arginfo_PositionIterator_key
#define swig_arginfo_TermIterator_positionlist_count swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_TermIterator_positionlist_end swig_arginfo_PositionIterator_key
#define swig_arginfo_TermIterator_rewind swig_arginfo_Compactor_compact
#define swig_arginfo_TermIterator_skip_to swig_arginfo_Compactor_add_source
#define swig_arginfo_TermIterator_valid swig_arginfo_Database_has_positions
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_TfIdfWeight, 0, 0, 0)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_TfIdfWeight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_TfIdfWeight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_TfIdfWeight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_TfIdfWeight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_TfIdfWeight_name swig_arginfo_Weight_name
#define swig_arginfo_new_TradWeight swig_arginfo_new_BB2Weight
#define swig_arginfo_TradWeight_get_maxextra swig_arginfo_Weight_get_maxextra
#define swig_arginfo_TradWeight_get_maxpart swig_arginfo_Weight_get_maxextra
#define swig_arginfo_TradWeight_get_sumextra swig_arginfo_Weight_get_sumextra
#define swig_arginfo_TradWeight_get_sumpart swig_arginfo_Weight_get_sumpart
#define swig_arginfo_TradWeight_name swig_arginfo_Weight_name
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_ValueCountMatchSpy, 0, 0, 1)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_ValueCountMatchSpy_apply, 0, 2, MAY_BE_VOID)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianDocument,0,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ValueCountMatchSpy_get_description swig_arginfo_Weight_name
#define swig_arginfo_ValueCountMatchSpy_get_total swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_ValueCountMatchSpy_merge_results swig_arginfo_Compactor_add_source
#define swig_arginfo_ValueCountMatchSpy_name swig_arginfo_Weight_name
#define swig_arginfo_ValueCountMatchSpy_top_values_begin swig_arginfo_Database_termlist_begin
#define swig_arginfo_ValueCountMatchSpy_top_values_end swig_arginfo_Database_termlist_begin
#define swig_arginfo_ValueCountMatchSpy_values_begin swig_arginfo_Database_spellings_begin
#define swig_arginfo_ValueCountMatchSpy_values_end swig_arginfo_Database_spellings_begin
#define swig_arginfo_new_ValueIterator swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_ValueIterator_check, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ValueIterator_current swig_arginfo_Weight_name
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_ValueIterator_equals, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianValueIterator,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ValueIterator_get_description swig_arginfo_Weight_name
#define swig_arginfo_ValueIterator_get_docid swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_ValueIterator_get_value swig_arginfo_Weight_name
#define swig_arginfo_ValueIterator_get_valueno swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_ValueIterator_key swig_arginfo_Document_values_begin
#define swig_arginfo_ValueIterator_next swig_arginfo_Compactor_compact
#define swig_arginfo_ValueIterator_rewind swig_arginfo_Compactor_compact
#define swig_arginfo_ValueIterator_skip_to swig_arginfo_Compactor_set_block_size
#define swig_arginfo_ValueIterator_valid swig_arginfo_Database_has_positions
#define swig_arginfo_new_ValueMapPostingSource swig_arginfo_new_ValueCountMatchSpy
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_ValueMapPostingSource_add_mapping, 0, 2, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_DOUBLE,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ValueMapPostingSource_clear_mappings swig_arginfo_Compactor_compact
#define swig_arginfo_ValueMapPostingSource_get_description swig_arginfo_Weight_name
#define swig_arginfo_ValueMapPostingSource_get_weight swig_arginfo_Weight_get_maxextra
#define swig_arginfo_ValueMapPostingSource_init swig_arginfo_Database_add_database
#define swig_arginfo_ValueMapPostingSource_name swig_arginfo_Weight_name
#define swig_arginfo_ValueMapPostingSource_set_default_weight swig_arginfo_CoordWeight_init
#define swig_arginfo_new_ValuePostingSource swig_arginfo_new_ValueCountMatchSpy
#define swig_arginfo_ValuePostingSource_at_end swig_arginfo_new_BoolWeight
#define swig_arginfo_ValuePostingSource_done swig_arginfo_Compactor_compact
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_ValuePostingSource_get_database, 0, 0, XapianDatabase, 0)
ZEND_END_ARG_INFO()
#define swig_arginfo_ValuePostingSource_get_docid swig_arginfo_new_BoolWeight
#define swig_arginfo_ValuePostingSource_get_slot swig_arginfo_BAD_VALUENO_get
#define swig_arginfo_ValuePostingSource_get_started swig_arginfo_Database_has_positions
#define swig_arginfo_ValuePostingSource_get_termfreq_est swig_arginfo_new_BoolWeight
#define swig_arginfo_ValuePostingSource_get_termfreq_max swig_arginfo_new_BoolWeight
#define swig_arginfo_ValuePostingSource_get_termfreq_min swig_arginfo_new_BoolWeight
#define swig_arginfo_ValuePostingSource_get_value swig_arginfo_Weight_name
#define swig_arginfo_ValuePostingSource_set_termfreq_est swig_arginfo_Compactor_set_block_size
#define swig_arginfo_ValuePostingSource_set_termfreq_max swig_arginfo_Compactor_set_block_size
#define swig_arginfo_ValuePostingSource_set_termfreq_min swig_arginfo_Compactor_set_block_size
#define swig_arginfo_new_ValueRangeProcessor swig_arginfo_new_BoolWeight
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(swig_arginfo_ValueRangeProcessor_release, 0, 0, XapianValueRangeProcessor, MAY_BE_NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_ValueSetMatchDecider, 0, 0, 2)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_BOOL,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ValueSetMatchDecider_add_value swig_arginfo_Compactor_add_source
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_ValueSetMatchDecider_apply, 0, 1, MAY_BE_BOOL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianDocument,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_ValueSetMatchDecider_remove_value swig_arginfo_Compactor_add_source
#define swig_arginfo_new_ValueWeightPostingSource swig_arginfo_new_ValueCountMatchSpy
ZEND_BEGIN_ARG_INFO_EX(swig_arginfo_new_WritableDatabase, 0, 0, 1)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_LONG,NULL)
 ZEND_ARG_TYPE_MASK(0,arg3,MAY_BE_LONG,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_WritableDatabase_add_database swig_arginfo_Database_add_database
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_WritableDatabase_add_document, 0, 1, MAY_BE_LONG)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg1,XapianDocument,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_WritableDatabase_add_spelling swig_arginfo_Document_add_term
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_WritableDatabase_add_synonym, 0, 2, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_STRING,NULL)
 ZEND_ARG_TYPE_MASK(0,arg2,MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_WritableDatabase_begin_transaction, 0, 0, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_BOOL,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_WritableDatabase_cancel_transaction swig_arginfo_Compactor_compact
#define swig_arginfo_WritableDatabase_clear_synonyms swig_arginfo_Compactor_add_source
#define swig_arginfo_WritableDatabase_commit swig_arginfo_Compactor_compact
#define swig_arginfo_WritableDatabase_commit_transaction swig_arginfo_Compactor_compact
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_WritableDatabase_delete_document, 0, 1, MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG|MAY_BE_STRING,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_WritableDatabase_flush swig_arginfo_Compactor_compact
#define swig_arginfo_WritableDatabase_get_description swig_arginfo_Weight_name
#define swig_arginfo_WritableDatabase_remove_spelling swig_arginfo_Document_add_term
#define swig_arginfo_WritableDatabase_remove_synonym swig_arginfo_WritableDatabase_add_synonym
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(swig_arginfo_WritableDatabase_replace_document, 0, 2, MAY_BE_LONG|MAY_BE_VOID)
 ZEND_ARG_TYPE_MASK(0,arg1,MAY_BE_LONG|MAY_BE_STRING,NULL)
 ZEND_ARG_OBJ_TYPE_MASK(0,arg2,XapianDocument,0,NULL)
ZEND_END_ARG_INFO()
#define swig_arginfo_WritableDatabase_set_metadata swig_arginfo_WritableDatabase_add_synonym


/* class entry subsection */
static const zend_function_entry class_PositionIterator_functions[] = {
 PHP_ME(XapianPositionIterator,__construct,swig_arginfo_new_PositionIterator,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianPositionIterator,skip_to,swig_arginfo_PositionIterator_skip_to,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,get_description,swig_arginfo_PositionIterator_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,key,swig_arginfo_PositionIterator_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,current,swig_arginfo_PositionIterator_current,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,valid,swig_arginfo_PositionIterator_valid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,rewind,swig_arginfo_PositionIterator_rewind,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,equals,swig_arginfo_PositionIterator_equals,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,get_termpos,swig_arginfo_PositionIterator_get_termpos,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,next,swig_arginfo_PositionIterator_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPositionIterator,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_PostingIterator_functions[] = {
 PHP_ME(XapianPostingIterator,__construct,swig_arginfo_new_PostingIterator,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianPostingIterator,get_wdf,swig_arginfo_PostingIterator_get_wdf,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,get_doclength,swig_arginfo_PostingIterator_get_doclength,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,get_unique_terms,swig_arginfo_PostingIterator_get_unique_terms,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,positionlist_begin,swig_arginfo_PostingIterator_positionlist_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,positionlist_end,swig_arginfo_PostingIterator_positionlist_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,skip_to,swig_arginfo_PostingIterator_skip_to,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,get_description,swig_arginfo_PostingIterator_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,key,swig_arginfo_PostingIterator_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,current,swig_arginfo_PostingIterator_current,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,valid,swig_arginfo_PostingIterator_valid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,rewind,swig_arginfo_PostingIterator_rewind,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,equals,swig_arginfo_PostingIterator_equals,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,get_docid,swig_arginfo_PostingIterator_get_docid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,next,swig_arginfo_PostingIterator_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingIterator,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_TermIterator_functions[] = {
 PHP_ME(XapianTermIterator,__construct,swig_arginfo_new_TermIterator,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianTermIterator,get_wdf,swig_arginfo_TermIterator_get_wdf,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,get_termfreq,swig_arginfo_TermIterator_get_termfreq,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,positionlist_count,swig_arginfo_TermIterator_positionlist_count,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,positionlist_begin,swig_arginfo_TermIterator_positionlist_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,positionlist_end,swig_arginfo_TermIterator_positionlist_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,skip_to,swig_arginfo_TermIterator_skip_to,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,get_description,swig_arginfo_TermIterator_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,key,swig_arginfo_TermIterator_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,current,swig_arginfo_TermIterator_current,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,valid,swig_arginfo_TermIterator_valid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,rewind,swig_arginfo_TermIterator_rewind,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,equals,swig_arginfo_TermIterator_equals,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,get_term,swig_arginfo_TermIterator_get_term,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,next,swig_arginfo_TermIterator_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermIterator,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ValueIterator_functions[] = {
 PHP_ME(XapianValueIterator,__construct,swig_arginfo_new_ValueIterator,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianValueIterator,get_docid,swig_arginfo_ValueIterator_get_docid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,get_valueno,swig_arginfo_ValueIterator_get_valueno,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,skip_to,swig_arginfo_ValueIterator_skip_to,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,check,swig_arginfo_ValueIterator_check,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,get_description,swig_arginfo_ValueIterator_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,key,swig_arginfo_ValueIterator_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,current,swig_arginfo_ValueIterator_current,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,valid,swig_arginfo_ValueIterator_valid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,rewind,swig_arginfo_ValueIterator_rewind,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,equals,swig_arginfo_ValueIterator_equals,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,get_value,swig_arginfo_ValueIterator_get_value,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,next,swig_arginfo_ValueIterator_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueIterator,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_Document_functions[] = {
 PHP_ME(XapianDocument,__construct,swig_arginfo_new_Document,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianDocument,get_value,swig_arginfo_Document_get_value,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,add_value,swig_arginfo_Document_add_value,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,remove_value,swig_arginfo_Document_remove_value,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,clear_values,swig_arginfo_Document_clear_values,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,get_data,swig_arginfo_Document_get_data,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,set_data,swig_arginfo_Document_set_data,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,add_posting,swig_arginfo_Document_add_posting,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,add_term,swig_arginfo_Document_add_term,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,add_boolean_term,swig_arginfo_Document_add_boolean_term,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,remove_posting,swig_arginfo_Document_remove_posting,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,remove_postings,swig_arginfo_Document_remove_postings,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,remove_term,swig_arginfo_Document_remove_term,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,clear_terms,swig_arginfo_Document_clear_terms,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,termlist_count,swig_arginfo_Document_termlist_count,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,termlist_begin,swig_arginfo_Document_termlist_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,termlist_end,swig_arginfo_Document_termlist_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,values_count,swig_arginfo_Document_values_count,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,values_begin,swig_arginfo_Document_values_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,values_end,swig_arginfo_Document_values_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,get_docid,swig_arginfo_Document_get_docid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,serialise,swig_arginfo_Document_serialise,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,unserialise,swig_arginfo_Document_unserialise,ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
 PHP_ME(XapianDocument,get_description,swig_arginfo_Document_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDocument,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_Registry_functions[] = {
 PHP_ME(XapianRegistry,__construct,swig_arginfo_new_Registry,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianRegistry,register_weighting_scheme,swig_arginfo_Registry_register_weighting_scheme,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRegistry,get_weighting_scheme,swig_arginfo_Registry_get_weighting_scheme,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRegistry,register_posting_source,swig_arginfo_Registry_register_posting_source,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRegistry,get_posting_source,swig_arginfo_Registry_get_posting_source,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRegistry,register_match_spy,swig_arginfo_Registry_register_match_spy,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRegistry,get_match_spy,swig_arginfo_Registry_get_match_spy,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRegistry,register_lat_long_metric,swig_arginfo_Registry_register_lat_long_metric,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRegistry,get_lat_long_metric,swig_arginfo_Registry_get_lat_long_metric,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRegistry,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRegistry,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRegistry,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_Query_functions[] = {
 PHP_ME(XapianQuery,MatchNothing,swig_arginfo_Query_MatchNothing_get,ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
 PHP_ME(XapianQuery,MatchAll,swig_arginfo_Query_MatchAll_get,ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
 PHP_ME(XapianQuery,get_terms_begin,swig_arginfo_Query_get_terms_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,get_terms_end,swig_arginfo_Query_get_terms_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,get_unique_terms_begin,swig_arginfo_Query_get_unique_terms_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,get_unique_terms_end,swig_arginfo_Query_get_unique_terms_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,get_length,swig_arginfo_Query_get_length,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,is_empty,swig_arginfo_Query_is_empty,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,serialise,swig_arginfo_Query_serialise,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,unserialise,swig_arginfo_Query_unserialise,ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
 PHP_ME(XapianQuery,get_type,swig_arginfo_Query_get_type,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,get_num_subqueries,swig_arginfo_Query_get_num_subqueries,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,get_subquery,swig_arginfo_Query_get_subquery,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,get_description,swig_arginfo_Query_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,__construct,swig_arginfo_new_Query,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianQuery,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQuery,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_StemImplementation_functions[] = {
 PHP_ME(XapianStemImplementation,__construct,swig_arginfo_new_StemImplementation,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianStemImplementation,apply,swig_arginfo_StemImplementation_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStemImplementation,get_description,swig_arginfo_StemImplementation_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStemImplementation,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStemImplementation,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStemImplementation,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_Stem_functions[] = {
 PHP_ME(XapianStem,__construct,swig_arginfo_new_Stem,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianStem,apply,swig_arginfo_Stem_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStem,is_none,swig_arginfo_Stem_is_none,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStem,get_description,swig_arginfo_Stem_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStem,get_available_languages,swig_arginfo_Stem_get_available_languages,ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
 PHP_ME(XapianStem,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStem,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStem,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_TermGenerator_functions[] = {
 PHP_ME(XapianTermGenerator,__construct,swig_arginfo_new_TermGenerator,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianTermGenerator,set_stemmer,swig_arginfo_TermGenerator_set_stemmer,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,set_stopper,swig_arginfo_TermGenerator_set_stopper,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,set_document,swig_arginfo_TermGenerator_set_document,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,get_document,swig_arginfo_TermGenerator_get_document,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,set_database,swig_arginfo_TermGenerator_set_database,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,set_flags,swig_arginfo_TermGenerator_set_flags,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,set_stemming_strategy,swig_arginfo_TermGenerator_set_stemming_strategy,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,set_stopper_strategy,swig_arginfo_TermGenerator_set_stopper_strategy,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,set_max_word_length,swig_arginfo_TermGenerator_set_max_word_length,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,index_text,swig_arginfo_TermGenerator_index_text,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,index_text_without_positions,swig_arginfo_TermGenerator_index_text_without_positions,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,increase_termpos,swig_arginfo_TermGenerator_increase_termpos,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,get_termpos,swig_arginfo_TermGenerator_get_termpos,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,set_termpos,swig_arginfo_TermGenerator_set_termpos,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,get_description,swig_arginfo_TermGenerator_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTermGenerator,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_MSet_functions[] = {
 PHP_ME(XapianMSet,__construct,swig_arginfo_new_MSet,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianMSet,convert_to_percent,swig_arginfo_MSet_convert_to_percent,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_termfreq,swig_arginfo_MSet_get_termfreq,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_termweight,swig_arginfo_MSet_get_termweight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_firstitem,swig_arginfo_MSet_get_firstitem,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_matches_lower_bound,swig_arginfo_MSet_get_matches_lower_bound,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_matches_estimated,swig_arginfo_MSet_get_matches_estimated,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_matches_upper_bound,swig_arginfo_MSet_get_matches_upper_bound,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_uncollapsed_matches_lower_bound,swig_arginfo_MSet_get_uncollapsed_matches_lower_bound,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_uncollapsed_matches_estimated,swig_arginfo_MSet_get_uncollapsed_matches_estimated,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_uncollapsed_matches_upper_bound,swig_arginfo_MSet_get_uncollapsed_matches_upper_bound,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_max_attained,swig_arginfo_MSet_get_max_attained,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_max_possible,swig_arginfo_MSet_get_max_possible,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,snippet,swig_arginfo_MSet_snippet,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,fetch,swig_arginfo_MSet_fetch,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,size,swig_arginfo_MSet_size,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,is_empty,swig_arginfo_MSet_is_empty,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,begin,swig_arginfo_MSet_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,end,swig_arginfo_MSet_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,back,swig_arginfo_MSet_back,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_description,swig_arginfo_MSet_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_docid,swig_arginfo_MSet_get_docid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_document,swig_arginfo_MSet_get_document,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_hit,swig_arginfo_MSet_get_hit,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,get_document_percentage,swig_arginfo_MSet_get_document_percentage,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSet,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_MSetIterator_functions[] = {
 PHP_ME(XapianMSetIterator,mset_set,swig_arginfo_MSetIterator_mset_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,mset_get,swig_arginfo_MSetIterator_mset_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,off_from_end_set,swig_arginfo_MSetIterator_off_from_end_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,off_from_end_get,swig_arginfo_MSetIterator_off_from_end_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,__construct,swig_arginfo_new_MSetIterator,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianMSetIterator,get_rank,swig_arginfo_MSetIterator_get_rank,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,get_document,swig_arginfo_MSetIterator_get_document,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,get_weight,swig_arginfo_MSetIterator_get_weight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,get_collapse_key,swig_arginfo_MSetIterator_get_collapse_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,get_collapse_count,swig_arginfo_MSetIterator_get_collapse_count,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,get_sort_key,swig_arginfo_MSetIterator_get_sort_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,get_percent,swig_arginfo_MSetIterator_get_percent,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,get_description,swig_arginfo_MSetIterator_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,key,swig_arginfo_MSetIterator_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,current,swig_arginfo_MSetIterator_current,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,valid,swig_arginfo_MSetIterator_valid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,rewind,swig_arginfo_MSetIterator_rewind,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,equals,swig_arginfo_MSetIterator_equals,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,get_docid,swig_arginfo_MSetIterator_get_docid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,next,swig_arginfo_MSetIterator_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,prev,swig_arginfo_MSetIterator_prev,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMSetIterator,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ESet_functions[] = {
 PHP_ME(XapianESet,__construct,swig_arginfo_new_ESet,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianESet,size,swig_arginfo_ESet_size,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESet,is_empty,swig_arginfo_ESet_is_empty,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESet,get_ebound,swig_arginfo_ESet_get_ebound,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESet,begin,swig_arginfo_ESet_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESet,end,swig_arginfo_ESet_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESet,back,swig_arginfo_ESet_back,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESet,get_description,swig_arginfo_ESet_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESet,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESet,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESet,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ESetIterator_functions[] = {
 PHP_ME(XapianESetIterator,eset_set,swig_arginfo_ESetIterator_eset_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,eset_get,swig_arginfo_ESetIterator_eset_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,off_from_end_set,swig_arginfo_ESetIterator_off_from_end_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,off_from_end_get,swig_arginfo_ESetIterator_off_from_end_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,__construct,swig_arginfo_new_ESetIterator,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianESetIterator,get_weight,swig_arginfo_ESetIterator_get_weight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,get_description,swig_arginfo_ESetIterator_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,key,swig_arginfo_ESetIterator_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,current,swig_arginfo_ESetIterator_current,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,valid,swig_arginfo_ESetIterator_valid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,rewind,swig_arginfo_ESetIterator_rewind,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,equals,swig_arginfo_ESetIterator_equals,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,get_term,swig_arginfo_ESetIterator_get_term,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,next,swig_arginfo_ESetIterator_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,prev,swig_arginfo_ESetIterator_prev,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianESetIterator,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_RSet_functions[] = {
 PHP_ME(XapianRSet,__construct,swig_arginfo_new_RSet,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianRSet,size,swig_arginfo_RSet_size,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRSet,is_empty,swig_arginfo_RSet_is_empty,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRSet,add_document,swig_arginfo_RSet_add_document,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRSet,remove_document,swig_arginfo_RSet_remove_document,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRSet,contains,swig_arginfo_RSet_contains,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRSet,get_description,swig_arginfo_RSet_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRSet,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRSet,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRSet,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_MatchDecider_functions[] = {
 PHP_ME(XapianMatchDecider,__construct,swig_arginfo_new_MatchDecider,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianMatchDecider,apply,swig_arginfo_MatchDecider_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMatchDecider,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMatchDecider,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMatchDecider,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_Enquire_functions[] = {
 PHP_ME(XapianEnquire,__construct,swig_arginfo_new_Enquire,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianEnquire,set_query,swig_arginfo_Enquire_set_query,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,get_query,swig_arginfo_Enquire_get_query,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,add_matchspy,swig_arginfo_Enquire_add_matchspy,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,clear_matchspies,swig_arginfo_Enquire_clear_matchspies,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_weighting_scheme,swig_arginfo_Enquire_set_weighting_scheme,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_expansion_scheme,swig_arginfo_Enquire_set_expansion_scheme,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_collapse_key,swig_arginfo_Enquire_set_collapse_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_docid_order,swig_arginfo_Enquire_set_docid_order,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_cutoff,swig_arginfo_Enquire_set_cutoff,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_sort_by_relevance,swig_arginfo_Enquire_set_sort_by_relevance,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_sort_by_value,swig_arginfo_Enquire_set_sort_by_value,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_sort_by_key,swig_arginfo_Enquire_set_sort_by_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_sort_by_value_then_relevance,swig_arginfo_Enquire_set_sort_by_value_then_relevance,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_sort_by_key_then_relevance,swig_arginfo_Enquire_set_sort_by_key_then_relevance,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_sort_by_relevance_then_value,swig_arginfo_Enquire_set_sort_by_relevance_then_value,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_sort_by_relevance_then_key,swig_arginfo_Enquire_set_sort_by_relevance_then_key,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,set_time_limit,swig_arginfo_Enquire_set_time_limit,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,get_mset,swig_arginfo_Enquire_get_mset,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,get_eset,swig_arginfo_Enquire_get_eset,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,get_matching_terms_begin,swig_arginfo_Enquire_get_matching_terms_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,get_matching_terms_end,swig_arginfo_Enquire_get_matching_terms_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,get_description,swig_arginfo_Enquire_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,get_matching_terms,swig_arginfo_Enquire_get_matching_terms,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianEnquire,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ExpandDecider_functions[] = {
 PHP_ME(XapianExpandDecider,__construct,swig_arginfo_new_ExpandDecider,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianExpandDecider,apply,swig_arginfo_ExpandDecider_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianExpandDecider,release,swig_arginfo_ExpandDecider_release,ZEND_ACC_PUBLIC)
 PHP_ME(XapianExpandDecider,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianExpandDecider,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianExpandDecider,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ExpandDeciderAnd_functions[] = {
 PHP_ME(XapianExpandDeciderAnd,__construct,swig_arginfo_new_ExpandDeciderAnd,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianExpandDeciderAnd,apply,swig_arginfo_ExpandDeciderAnd_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianExpandDeciderAnd,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianExpandDeciderAnd,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianExpandDeciderAnd,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ExpandDeciderFilterPrefix_functions[] = {
 PHP_ME(XapianExpandDeciderFilterPrefix,__construct,swig_arginfo_new_ExpandDeciderFilterPrefix,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianExpandDeciderFilterPrefix,apply,swig_arginfo_ExpandDeciderFilterPrefix_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianExpandDeciderFilterPrefix,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianExpandDeciderFilterPrefix,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianExpandDeciderFilterPrefix,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_KeyMaker_functions[] = {
 PHP_ME(XapianKeyMaker,__construct,swig_arginfo_new_KeyMaker,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianKeyMaker,apply,swig_arginfo_KeyMaker_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianKeyMaker,release,swig_arginfo_KeyMaker_release,ZEND_ACC_PUBLIC)
 PHP_ME(XapianKeyMaker,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianKeyMaker,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianKeyMaker,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_MultiValueKeyMaker_functions[] = {
 PHP_ME(XapianMultiValueKeyMaker,__construct,swig_arginfo_new_MultiValueKeyMaker,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianMultiValueKeyMaker,apply,swig_arginfo_MultiValueKeyMaker_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMultiValueKeyMaker,add_value,swig_arginfo_MultiValueKeyMaker_add_value,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMultiValueKeyMaker,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMultiValueKeyMaker,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMultiValueKeyMaker,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_Stopper_functions[] = {
 PHP_ME(XapianStopper,__construct,swig_arginfo_new_Stopper,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianStopper,apply,swig_arginfo_Stopper_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStopper,get_description,swig_arginfo_Stopper_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStopper,release,swig_arginfo_Stopper_release,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStopper,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStopper,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStopper,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_SimpleStopper_functions[] = {
 PHP_ME(XapianSimpleStopper,add,swig_arginfo_SimpleStopper_add,ZEND_ACC_PUBLIC)
 PHP_ME(XapianSimpleStopper,apply,swig_arginfo_SimpleStopper_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianSimpleStopper,get_description,swig_arginfo_SimpleStopper_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianSimpleStopper,__construct,swig_arginfo_new_SimpleStopper,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianSimpleStopper,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianSimpleStopper,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianSimpleStopper,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_RangeProcessor_functions[] = {
 PHP_ME(XapianRangeProcessor,__construct,swig_arginfo_new_RangeProcessor,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianRangeProcessor,check_range,swig_arginfo_RangeProcessor_check_range,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRangeProcessor,apply,swig_arginfo_RangeProcessor_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRangeProcessor,release,swig_arginfo_RangeProcessor_release,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRangeProcessor,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRangeProcessor,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianRangeProcessor,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_DateRangeProcessor_functions[] = {
 PHP_ME(XapianDateRangeProcessor,__construct,swig_arginfo_new_DateRangeProcessor,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianDateRangeProcessor,apply,swig_arginfo_DateRangeProcessor_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDateRangeProcessor,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDateRangeProcessor,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDateRangeProcessor,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_NumberRangeProcessor_functions[] = {
 PHP_ME(XapianNumberRangeProcessor,__construct,swig_arginfo_new_NumberRangeProcessor,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianNumberRangeProcessor,apply,swig_arginfo_NumberRangeProcessor_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianNumberRangeProcessor,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianNumberRangeProcessor,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianNumberRangeProcessor,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ValueRangeProcessor_functions[] = {
 PHP_ME(XapianValueRangeProcessor,__construct,swig_arginfo_new_ValueRangeProcessor,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianValueRangeProcessor,apply,swig_arginfo_ValueRangeProcessor_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueRangeProcessor,release,swig_arginfo_ValueRangeProcessor_release,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueRangeProcessor,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueRangeProcessor,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueRangeProcessor,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_StringValueRangeProcessor_functions[] = {
 PHP_ME(XapianStringValueRangeProcessor,__construct,swig_arginfo_new_StringValueRangeProcessor,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianStringValueRangeProcessor,apply,swig_arginfo_StringValueRangeProcessor_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStringValueRangeProcessor,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStringValueRangeProcessor,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianStringValueRangeProcessor,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_DateValueRangeProcessor_functions[] = {
 PHP_ME(XapianDateValueRangeProcessor,__construct,swig_arginfo_new_DateValueRangeProcessor,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianDateValueRangeProcessor,apply,swig_arginfo_DateValueRangeProcessor_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDateValueRangeProcessor,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDateValueRangeProcessor,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDateValueRangeProcessor,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_NumberValueRangeProcessor_functions[] = {
 PHP_ME(XapianNumberValueRangeProcessor,__construct,swig_arginfo_new_NumberValueRangeProcessor,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianNumberValueRangeProcessor,apply,swig_arginfo_NumberValueRangeProcessor_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianNumberValueRangeProcessor,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianNumberValueRangeProcessor,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianNumberValueRangeProcessor,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_FieldProcessor_functions[] = {
 PHP_ME(XapianFieldProcessor,__construct,swig_arginfo_new_FieldProcessor,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianFieldProcessor,apply,swig_arginfo_FieldProcessor_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFieldProcessor,release,swig_arginfo_FieldProcessor_release,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFieldProcessor,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFieldProcessor,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFieldProcessor,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_QueryParser_functions[] = {
 PHP_ME(XapianQueryParser,__construct,swig_arginfo_new_QueryParser,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianQueryParser,set_stemmer,swig_arginfo_QueryParser_set_stemmer,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,set_stemming_strategy,swig_arginfo_QueryParser_set_stemming_strategy,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,set_stopper,swig_arginfo_QueryParser_set_stopper,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,set_default_op,swig_arginfo_QueryParser_set_default_op,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,get_default_op,swig_arginfo_QueryParser_get_default_op,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,set_database,swig_arginfo_QueryParser_set_database,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,set_max_expansion,swig_arginfo_QueryParser_set_max_expansion,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,set_max_wildcard_expansion,swig_arginfo_QueryParser_set_max_wildcard_expansion,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,parse_query,swig_arginfo_QueryParser_parse_query,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,add_prefix,swig_arginfo_QueryParser_add_prefix,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,add_boolean_prefix,swig_arginfo_QueryParser_add_boolean_prefix,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,stoplist_begin,swig_arginfo_QueryParser_stoplist_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,stoplist_end,swig_arginfo_QueryParser_stoplist_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,unstem_begin,swig_arginfo_QueryParser_unstem_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,unstem_end,swig_arginfo_QueryParser_unstem_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,add_rangeprocessor,swig_arginfo_QueryParser_add_rangeprocessor,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,add_valuerangeprocessor,swig_arginfo_QueryParser_add_valuerangeprocessor,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,get_corrected_query_string,swig_arginfo_QueryParser_get_corrected_query_string,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,get_description,swig_arginfo_QueryParser_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianQueryParser,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ValueSetMatchDecider_functions[] = {
 PHP_ME(XapianValueSetMatchDecider,__construct,swig_arginfo_new_ValueSetMatchDecider,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianValueSetMatchDecider,add_value,swig_arginfo_ValueSetMatchDecider_add_value,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueSetMatchDecider,remove_value,swig_arginfo_ValueSetMatchDecider_remove_value,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueSetMatchDecider,apply,swig_arginfo_ValueSetMatchDecider_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueSetMatchDecider,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueSetMatchDecider,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueSetMatchDecider,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_Weight_functions[] = {
 PHP_ME(XapianWeight,name,swig_arginfo_Weight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWeight,get_sumpart,swig_arginfo_Weight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWeight,get_maxpart,swig_arginfo_Weight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWeight,get_sumextra,swig_arginfo_Weight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWeight,get_maxextra,swig_arginfo_Weight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWeight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWeight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWeight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_BoolWeight_functions[] = {
 PHP_ME(XapianBoolWeight,__construct,swig_arginfo_new_BoolWeight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianBoolWeight,name,swig_arginfo_BoolWeight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBoolWeight,get_sumpart,swig_arginfo_BoolWeight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBoolWeight,get_maxpart,swig_arginfo_BoolWeight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBoolWeight,get_sumextra,swig_arginfo_BoolWeight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBoolWeight,get_maxextra,swig_arginfo_BoolWeight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBoolWeight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBoolWeight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBoolWeight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_TfIdfWeight_functions[] = {
 PHP_ME(XapianTfIdfWeight,__construct,swig_arginfo_new_TfIdfWeight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianTfIdfWeight,name,swig_arginfo_TfIdfWeight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTfIdfWeight,get_sumpart,swig_arginfo_TfIdfWeight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTfIdfWeight,get_maxpart,swig_arginfo_TfIdfWeight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTfIdfWeight,get_sumextra,swig_arginfo_TfIdfWeight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTfIdfWeight,get_maxextra,swig_arginfo_TfIdfWeight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTfIdfWeight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTfIdfWeight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTfIdfWeight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_BM25Weight_functions[] = {
 PHP_ME(XapianBM25Weight,__construct,swig_arginfo_new_BM25Weight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianBM25Weight,name,swig_arginfo_BM25Weight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25Weight,get_sumpart,swig_arginfo_BM25Weight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25Weight,get_maxpart,swig_arginfo_BM25Weight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25Weight,get_sumextra,swig_arginfo_BM25Weight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25Weight,get_maxextra,swig_arginfo_BM25Weight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25Weight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25Weight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25Weight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_BM25PlusWeight_functions[] = {
 PHP_ME(XapianBM25PlusWeight,__construct,swig_arginfo_new_BM25PlusWeight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianBM25PlusWeight,name,swig_arginfo_BM25PlusWeight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25PlusWeight,get_sumpart,swig_arginfo_BM25PlusWeight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25PlusWeight,get_maxpart,swig_arginfo_BM25PlusWeight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25PlusWeight,get_sumextra,swig_arginfo_BM25PlusWeight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25PlusWeight,get_maxextra,swig_arginfo_BM25PlusWeight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25PlusWeight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25PlusWeight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBM25PlusWeight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_TradWeight_functions[] = {
 PHP_ME(XapianTradWeight,__construct,swig_arginfo_new_TradWeight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianTradWeight,name,swig_arginfo_TradWeight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTradWeight,get_sumpart,swig_arginfo_TradWeight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTradWeight,get_maxpart,swig_arginfo_TradWeight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTradWeight,get_sumextra,swig_arginfo_TradWeight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTradWeight,get_maxextra,swig_arginfo_TradWeight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTradWeight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTradWeight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianTradWeight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_InL2Weight_functions[] = {
 PHP_ME(XapianInL2Weight,__construct,swig_arginfo_new_InL2Weight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianInL2Weight,name,swig_arginfo_InL2Weight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianInL2Weight,get_sumpart,swig_arginfo_InL2Weight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianInL2Weight,get_maxpart,swig_arginfo_InL2Weight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianInL2Weight,get_sumextra,swig_arginfo_InL2Weight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianInL2Weight,get_maxextra,swig_arginfo_InL2Weight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianInL2Weight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianInL2Weight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianInL2Weight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_IfB2Weight_functions[] = {
 PHP_ME(XapianIfB2Weight,__construct,swig_arginfo_new_IfB2Weight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianIfB2Weight,name,swig_arginfo_IfB2Weight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIfB2Weight,get_sumpart,swig_arginfo_IfB2Weight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIfB2Weight,get_maxpart,swig_arginfo_IfB2Weight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIfB2Weight,get_sumextra,swig_arginfo_IfB2Weight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIfB2Weight,get_maxextra,swig_arginfo_IfB2Weight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIfB2Weight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIfB2Weight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIfB2Weight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_IneB2Weight_functions[] = {
 PHP_ME(XapianIneB2Weight,__construct,swig_arginfo_new_IneB2Weight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianIneB2Weight,name,swig_arginfo_IneB2Weight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIneB2Weight,get_sumpart,swig_arginfo_IneB2Weight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIneB2Weight,get_maxpart,swig_arginfo_IneB2Weight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIneB2Weight,get_sumextra,swig_arginfo_IneB2Weight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIneB2Weight,get_maxextra,swig_arginfo_IneB2Weight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIneB2Weight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIneB2Weight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianIneB2Weight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_BB2Weight_functions[] = {
 PHP_ME(XapianBB2Weight,__construct,swig_arginfo_new_BB2Weight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianBB2Weight,name,swig_arginfo_BB2Weight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBB2Weight,get_sumpart,swig_arginfo_BB2Weight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBB2Weight,get_maxpart,swig_arginfo_BB2Weight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBB2Weight,get_sumextra,swig_arginfo_BB2Weight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBB2Weight,get_maxextra,swig_arginfo_BB2Weight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBB2Weight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBB2Weight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianBB2Weight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_DLHWeight_functions[] = {
 PHP_ME(XapianDLHWeight,__construct,swig_arginfo_new_DLHWeight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianDLHWeight,name,swig_arginfo_DLHWeight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDLHWeight,get_sumpart,swig_arginfo_DLHWeight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDLHWeight,get_maxpart,swig_arginfo_DLHWeight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDLHWeight,get_sumextra,swig_arginfo_DLHWeight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDLHWeight,get_maxextra,swig_arginfo_DLHWeight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDLHWeight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDLHWeight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDLHWeight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_PL2Weight_functions[] = {
 PHP_ME(XapianPL2Weight,__construct,swig_arginfo_new_PL2Weight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianPL2Weight,name,swig_arginfo_PL2Weight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2Weight,get_sumpart,swig_arginfo_PL2Weight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2Weight,get_maxpart,swig_arginfo_PL2Weight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2Weight,get_sumextra,swig_arginfo_PL2Weight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2Weight,get_maxextra,swig_arginfo_PL2Weight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2Weight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2Weight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2Weight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_PL2PlusWeight_functions[] = {
 PHP_ME(XapianPL2PlusWeight,__construct,swig_arginfo_new_PL2PlusWeight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianPL2PlusWeight,name,swig_arginfo_PL2PlusWeight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2PlusWeight,get_sumpart,swig_arginfo_PL2PlusWeight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2PlusWeight,get_maxpart,swig_arginfo_PL2PlusWeight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2PlusWeight,get_sumextra,swig_arginfo_PL2PlusWeight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2PlusWeight,get_maxextra,swig_arginfo_PL2PlusWeight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2PlusWeight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2PlusWeight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPL2PlusWeight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_DPHWeight_functions[] = {
 PHP_ME(XapianDPHWeight,__construct,swig_arginfo_new_DPHWeight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianDPHWeight,name,swig_arginfo_DPHWeight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDPHWeight,get_sumpart,swig_arginfo_DPHWeight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDPHWeight,get_maxpart,swig_arginfo_DPHWeight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDPHWeight,get_sumextra,swig_arginfo_DPHWeight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDPHWeight,get_maxextra,swig_arginfo_DPHWeight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDPHWeight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDPHWeight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDPHWeight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_LMWeight_functions[] = {
 PHP_ME(XapianLMWeight,__construct,swig_arginfo_new_LMWeight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianLMWeight,name,swig_arginfo_LMWeight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLMWeight,get_sumpart,swig_arginfo_LMWeight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLMWeight,get_maxpart,swig_arginfo_LMWeight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLMWeight,get_sumextra,swig_arginfo_LMWeight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLMWeight,get_maxextra,swig_arginfo_LMWeight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLMWeight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLMWeight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLMWeight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_CoordWeight_functions[] = {
 PHP_ME(XapianCoordWeight,init,swig_arginfo_CoordWeight_init,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCoordWeight,__construct,swig_arginfo_new_CoordWeight,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianCoordWeight,name,swig_arginfo_CoordWeight_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCoordWeight,get_sumpart,swig_arginfo_CoordWeight_get_sumpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCoordWeight,get_maxpart,swig_arginfo_CoordWeight_get_maxpart,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCoordWeight,get_sumextra,swig_arginfo_CoordWeight_get_sumextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCoordWeight,get_maxextra,swig_arginfo_CoordWeight_get_maxextra,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCoordWeight,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCoordWeight,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCoordWeight,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_Compactor_functions[] = {
 PHP_ME(XapianCompactor,__construct,swig_arginfo_new_Compactor,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianCompactor,set_block_size,swig_arginfo_Compactor_set_block_size,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,set_renumber,swig_arginfo_Compactor_set_renumber,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,set_multipass,swig_arginfo_Compactor_set_multipass,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,set_compaction_level,swig_arginfo_Compactor_set_compaction_level,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,set_destdir,swig_arginfo_Compactor_set_destdir,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,add_source,swig_arginfo_Compactor_add_source,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,compact,swig_arginfo_Compactor_compact,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,set_status,swig_arginfo_Compactor_set_status,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,resolve_duplicate_metadata,swig_arginfo_Compactor_resolve_duplicate_metadata,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianCompactor,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_PostingSource_functions[] = {
 PHP_ME(XapianPostingSource,__construct,swig_arginfo_new_PostingSource,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianPostingSource,get_termfreq_min,swig_arginfo_PostingSource_get_termfreq_min,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,get_termfreq_est,swig_arginfo_PostingSource_get_termfreq_est,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,get_termfreq_max,swig_arginfo_PostingSource_get_termfreq_max,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,set_maxweight,swig_arginfo_PostingSource_set_maxweight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,get_maxweight,swig_arginfo_PostingSource_get_maxweight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,get_weight,swig_arginfo_PostingSource_get_weight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,get_docid,swig_arginfo_PostingSource_get_docid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,next,swig_arginfo_PostingSource_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,skip_to,swig_arginfo_PostingSource_skip_to,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,check,swig_arginfo_PostingSource_check,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,at_end,swig_arginfo_PostingSource_at_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,name,swig_arginfo_PostingSource_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,init,swig_arginfo_PostingSource_init,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,get_description,swig_arginfo_PostingSource_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,release,swig_arginfo_PostingSource_release,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianPostingSource,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ValuePostingSource_functions[] = {
 PHP_ME(XapianValuePostingSource,__construct,swig_arginfo_new_ValuePostingSource,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianValuePostingSource,get_termfreq_min,swig_arginfo_ValuePostingSource_get_termfreq_min,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,get_termfreq_est,swig_arginfo_ValuePostingSource_get_termfreq_est,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,get_termfreq_max,swig_arginfo_ValuePostingSource_get_termfreq_max,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,next,swig_arginfo_ValuePostingSource_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,skip_to,swig_arginfo_ValuePostingSource_skip_to,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,check,swig_arginfo_ValuePostingSource_check,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,at_end,swig_arginfo_ValuePostingSource_at_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,get_docid,swig_arginfo_ValuePostingSource_get_docid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,init,swig_arginfo_ValuePostingSource_init,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,get_database,swig_arginfo_ValuePostingSource_get_database,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,get_slot,swig_arginfo_ValuePostingSource_get_slot,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,get_value,swig_arginfo_ValuePostingSource_get_value,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,done,swig_arginfo_ValuePostingSource_done,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,get_started,swig_arginfo_ValuePostingSource_get_started,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,set_termfreq_min,swig_arginfo_ValuePostingSource_set_termfreq_min,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,set_termfreq_est,swig_arginfo_ValuePostingSource_set_termfreq_est,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,set_termfreq_max,swig_arginfo_ValuePostingSource_set_termfreq_max,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValuePostingSource,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ValueWeightPostingSource_functions[] = {
 PHP_ME(XapianValueWeightPostingSource,__construct,swig_arginfo_new_ValueWeightPostingSource,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianValueWeightPostingSource,get_weight,swig_arginfo_ValueWeightPostingSource_get_weight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueWeightPostingSource,name,swig_arginfo_ValueWeightPostingSource_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueWeightPostingSource,init,swig_arginfo_ValueWeightPostingSource_init,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueWeightPostingSource,get_description,swig_arginfo_ValueWeightPostingSource_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueWeightPostingSource,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueWeightPostingSource,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueWeightPostingSource,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_DecreasingValueWeightPostingSource_functions[] = {
 PHP_ME(XapianDecreasingValueWeightPostingSource,__construct,swig_arginfo_new_DecreasingValueWeightPostingSource,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianDecreasingValueWeightPostingSource,get_weight,swig_arginfo_DecreasingValueWeightPostingSource_get_weight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDecreasingValueWeightPostingSource,name,swig_arginfo_DecreasingValueWeightPostingSource_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDecreasingValueWeightPostingSource,init,swig_arginfo_DecreasingValueWeightPostingSource_init,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDecreasingValueWeightPostingSource,next,swig_arginfo_DecreasingValueWeightPostingSource_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDecreasingValueWeightPostingSource,skip_to,swig_arginfo_DecreasingValueWeightPostingSource_skip_to,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDecreasingValueWeightPostingSource,check,swig_arginfo_DecreasingValueWeightPostingSource_check,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDecreasingValueWeightPostingSource,get_description,swig_arginfo_DecreasingValueWeightPostingSource_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDecreasingValueWeightPostingSource,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDecreasingValueWeightPostingSource,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDecreasingValueWeightPostingSource,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ValueMapPostingSource_functions[] = {
 PHP_ME(XapianValueMapPostingSource,__construct,swig_arginfo_new_ValueMapPostingSource,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianValueMapPostingSource,add_mapping,swig_arginfo_ValueMapPostingSource_add_mapping,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueMapPostingSource,clear_mappings,swig_arginfo_ValueMapPostingSource_clear_mappings,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueMapPostingSource,set_default_weight,swig_arginfo_ValueMapPostingSource_set_default_weight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueMapPostingSource,get_weight,swig_arginfo_ValueMapPostingSource_get_weight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueMapPostingSource,name,swig_arginfo_ValueMapPostingSource_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueMapPostingSource,init,swig_arginfo_ValueMapPostingSource_init,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueMapPostingSource,get_description,swig_arginfo_ValueMapPostingSource_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueMapPostingSource,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueMapPostingSource,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueMapPostingSource,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_FixedWeightPostingSource_functions[] = {
 PHP_ME(XapianFixedWeightPostingSource,__construct,swig_arginfo_new_FixedWeightPostingSource,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianFixedWeightPostingSource,get_termfreq_min,swig_arginfo_FixedWeightPostingSource_get_termfreq_min,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,get_termfreq_est,swig_arginfo_FixedWeightPostingSource_get_termfreq_est,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,get_termfreq_max,swig_arginfo_FixedWeightPostingSource_get_termfreq_max,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,get_weight,swig_arginfo_FixedWeightPostingSource_get_weight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,next,swig_arginfo_FixedWeightPostingSource_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,skip_to,swig_arginfo_FixedWeightPostingSource_skip_to,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,check,swig_arginfo_FixedWeightPostingSource_check,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,at_end,swig_arginfo_FixedWeightPostingSource_at_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,get_docid,swig_arginfo_FixedWeightPostingSource_get_docid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,name,swig_arginfo_FixedWeightPostingSource_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,init,swig_arginfo_FixedWeightPostingSource_init,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,get_description,swig_arginfo_FixedWeightPostingSource_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianFixedWeightPostingSource,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_MatchSpy_functions[] = {
 PHP_ME(XapianMatchSpy,__construct,swig_arginfo_new_MatchSpy,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianMatchSpy,apply,swig_arginfo_MatchSpy_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMatchSpy,name,swig_arginfo_MatchSpy_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMatchSpy,merge_results,swig_arginfo_MatchSpy_merge_results,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMatchSpy,get_description,swig_arginfo_MatchSpy_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMatchSpy,release,swig_arginfo_MatchSpy_release,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMatchSpy,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMatchSpy,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianMatchSpy,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_ValueCountMatchSpy_functions[] = {
 PHP_ME(XapianValueCountMatchSpy,__construct,swig_arginfo_new_ValueCountMatchSpy,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianValueCountMatchSpy,get_total,swig_arginfo_ValueCountMatchSpy_get_total,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,values_begin,swig_arginfo_ValueCountMatchSpy_values_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,values_end,swig_arginfo_ValueCountMatchSpy_values_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,top_values_begin,swig_arginfo_ValueCountMatchSpy_top_values_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,top_values_end,swig_arginfo_ValueCountMatchSpy_top_values_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,apply,swig_arginfo_ValueCountMatchSpy_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,name,swig_arginfo_ValueCountMatchSpy_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,merge_results,swig_arginfo_ValueCountMatchSpy_merge_results,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,get_description,swig_arginfo_ValueCountMatchSpy_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianValueCountMatchSpy,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_LatLongCoord_functions[] = {
 PHP_ME(XapianLatLongCoord,latitude_set,swig_arginfo_LatLongCoord_latitude_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoord,latitude_get,swig_arginfo_LatLongCoord_latitude_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoord,longitude_set,swig_arginfo_LatLongCoord_longitude_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoord,longitude_get,swig_arginfo_LatLongCoord_longitude_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoord,__construct,swig_arginfo_new_LatLongCoord,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianLatLongCoord,unserialise,swig_arginfo_LatLongCoord_unserialise,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoord,serialise,swig_arginfo_LatLongCoord_serialise,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoord,get_description,swig_arginfo_LatLongCoord_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoord,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoord,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoord,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_LatLongCoordsIterator_functions[] = {
 PHP_ME(XapianLatLongCoordsIterator,__construct,swig_arginfo_new_LatLongCoordsIterator,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianLatLongCoordsIterator,equals,swig_arginfo_LatLongCoordsIterator_equals,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoordsIterator,get_coord,swig_arginfo_LatLongCoordsIterator_get_coord,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoordsIterator,next,swig_arginfo_LatLongCoordsIterator_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoordsIterator,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoordsIterator,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoordsIterator,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_LatLongCoords_functions[] = {
 PHP_ME(XapianLatLongCoords,begin,swig_arginfo_LatLongCoords_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoords,end,swig_arginfo_LatLongCoords_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoords,size,swig_arginfo_LatLongCoords_size,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoords,is_empty,swig_arginfo_LatLongCoords_is_empty,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoords,append,swig_arginfo_LatLongCoords_append,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoords,__construct,swig_arginfo_new_LatLongCoords,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianLatLongCoords,unserialise,swig_arginfo_LatLongCoords_unserialise,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoords,serialise,swig_arginfo_LatLongCoords_serialise,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoords,get_description,swig_arginfo_LatLongCoords_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoords,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoords,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongCoords,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_LatLongMetric_functions[] = {
 PHP_ME(XapianLatLongMetric,pointwise_distance,swig_arginfo_LatLongMetric_pointwise_distance,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongMetric,apply,swig_arginfo_LatLongMetric_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongMetric,name,swig_arginfo_LatLongMetric_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongMetric,__construct,swig_arginfo_new_LatLongMetric,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianLatLongMetric,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongMetric,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongMetric,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_GreatCircleMetric_functions[] = {
 PHP_ME(XapianGreatCircleMetric,__construct,swig_arginfo_new_GreatCircleMetric,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianGreatCircleMetric,pointwise_distance,swig_arginfo_GreatCircleMetric_pointwise_distance,ZEND_ACC_PUBLIC)
 PHP_ME(XapianGreatCircleMetric,name,swig_arginfo_GreatCircleMetric_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianGreatCircleMetric,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianGreatCircleMetric,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianGreatCircleMetric,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_LatLongDistancePostingSource_functions[] = {
 PHP_ME(XapianLatLongDistancePostingSource,__construct,swig_arginfo_new_LatLongDistancePostingSource,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianLatLongDistancePostingSource,next,swig_arginfo_LatLongDistancePostingSource_next,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistancePostingSource,skip_to,swig_arginfo_LatLongDistancePostingSource_skip_to,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistancePostingSource,check,swig_arginfo_LatLongDistancePostingSource_check,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistancePostingSource,get_weight,swig_arginfo_LatLongDistancePostingSource_get_weight,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistancePostingSource,name,swig_arginfo_LatLongDistancePostingSource_name,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistancePostingSource,init,swig_arginfo_LatLongDistancePostingSource_init,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistancePostingSource,get_description,swig_arginfo_LatLongDistancePostingSource_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistancePostingSource,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistancePostingSource,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistancePostingSource,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_LatLongDistanceKeyMaker_functions[] = {
 PHP_ME(XapianLatLongDistanceKeyMaker,__construct,swig_arginfo_new_LatLongDistanceKeyMaker,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianLatLongDistanceKeyMaker,apply,swig_arginfo_LatLongDistanceKeyMaker_apply,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistanceKeyMaker,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistanceKeyMaker,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianLatLongDistanceKeyMaker,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_Database_functions[] = {
 PHP_ME(XapianDatabase,add_database,swig_arginfo_Database_add_database,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,size,swig_arginfo_Database_size,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,__construct,swig_arginfo_new_Database,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianDatabase,reopen,swig_arginfo_Database_reopen,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,close,swig_arginfo_Database_close,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_description,swig_arginfo_Database_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,postlist_begin,swig_arginfo_Database_postlist_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,postlist_end,swig_arginfo_Database_postlist_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,termlist_begin,swig_arginfo_Database_termlist_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,termlist_end,swig_arginfo_Database_termlist_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,has_positions,swig_arginfo_Database_has_positions,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,positionlist_begin,swig_arginfo_Database_positionlist_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,positionlist_end,swig_arginfo_Database_positionlist_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,allterms_begin,swig_arginfo_Database_allterms_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,allterms_end,swig_arginfo_Database_allterms_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_doccount,swig_arginfo_Database_get_doccount,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_lastdocid,swig_arginfo_Database_get_lastdocid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_avlength,swig_arginfo_Database_get_avlength,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_average_length,swig_arginfo_Database_get_average_length,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_total_length,swig_arginfo_Database_get_total_length,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_termfreq,swig_arginfo_Database_get_termfreq,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,term_exists,swig_arginfo_Database_term_exists,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_collection_freq,swig_arginfo_Database_get_collection_freq,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_value_freq,swig_arginfo_Database_get_value_freq,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_value_lower_bound,swig_arginfo_Database_get_value_lower_bound,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_value_upper_bound,swig_arginfo_Database_get_value_upper_bound,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_doclength_lower_bound,swig_arginfo_Database_get_doclength_lower_bound,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_doclength_upper_bound,swig_arginfo_Database_get_doclength_upper_bound,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_wdf_upper_bound,swig_arginfo_Database_get_wdf_upper_bound,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,valuestream_begin,swig_arginfo_Database_valuestream_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,valuestream_end,swig_arginfo_Database_valuestream_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_doclength,swig_arginfo_Database_get_doclength,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_unique_terms,swig_arginfo_Database_get_unique_terms,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,keep_alive,swig_arginfo_Database_keep_alive,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_document,swig_arginfo_Database_get_document,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_spelling_suggestion,swig_arginfo_Database_get_spelling_suggestion,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,spellings_begin,swig_arginfo_Database_spellings_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,spellings_end,swig_arginfo_Database_spellings_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,synonyms_begin,swig_arginfo_Database_synonyms_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,synonyms_end,swig_arginfo_Database_synonyms_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,synonym_keys_begin,swig_arginfo_Database_synonym_keys_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,synonym_keys_end,swig_arginfo_Database_synonym_keys_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_metadata,swig_arginfo_Database_get_metadata,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,metadata_keys_begin,swig_arginfo_Database_metadata_keys_begin,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,metadata_keys_end,swig_arginfo_Database_metadata_keys_end,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_uuid,swig_arginfo_Database_get_uuid,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,locked,swig_arginfo_Database_locked,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,get_revision,swig_arginfo_Database_get_revision,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,check,swig_arginfo_Database_check,ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
 PHP_ME(XapianDatabase,compact,swig_arginfo_Database_compact,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianDatabase,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};

static const zend_function_entry class_WritableDatabase_functions[] = {
 PHP_ME(XapianWritableDatabase,__construct,swig_arginfo_new_WritableDatabase,ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
 PHP_ME(XapianWritableDatabase,add_database,swig_arginfo_WritableDatabase_add_database,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,commit,swig_arginfo_WritableDatabase_commit,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,flush,swig_arginfo_WritableDatabase_flush,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,begin_transaction,swig_arginfo_WritableDatabase_begin_transaction,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,commit_transaction,swig_arginfo_WritableDatabase_commit_transaction,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,cancel_transaction,swig_arginfo_WritableDatabase_cancel_transaction,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,add_document,swig_arginfo_WritableDatabase_add_document,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,delete_document,swig_arginfo_WritableDatabase_delete_document,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,replace_document,swig_arginfo_WritableDatabase_replace_document,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,add_spelling,swig_arginfo_WritableDatabase_add_spelling,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,remove_spelling,swig_arginfo_WritableDatabase_remove_spelling,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,add_synonym,swig_arginfo_WritableDatabase_add_synonym,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,remove_synonym,swig_arginfo_WritableDatabase_remove_synonym,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,clear_synonyms,swig_arginfo_WritableDatabase_clear_synonyms,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,set_metadata,swig_arginfo_WritableDatabase_set_metadata,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,get_description,swig_arginfo_WritableDatabase_get_description,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,__set,swig_magic_arginfo_set,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,__get,swig_magic_arginfo_get,ZEND_ACC_PUBLIC)
 PHP_ME(XapianWritableDatabase,__isset,swig_magic_arginfo_isset,ZEND_ACC_PUBLIC)
 ZEND_FE_END
};



/* entry subsection */
/* Every non-class user visible function must have an entry here */
static const zend_function_entry module_xapian_functions[] = {
 PHP_FE(version_string,swig_arginfo_version_string)
 PHP_FE(major_version,swig_arginfo_major_version)
 PHP_FE(minor_version,swig_arginfo_minor_version)
 PHP_FE(revision,swig_arginfo_revision)
 PHP_FE(sortable_serialise,swig_arginfo_sortable_serialise)
 PHP_FE(sortable_unserialise,swig_arginfo_sortable_unserialise)
 PHP_FE(miles_to_metres,swig_arginfo_miles_to_metres)
 PHP_FE(metres_to_miles,swig_arginfo_metres_to_miles)
 ZEND_NAMED_FE(auto_open_stub,_wrap_auto_open_stub,swig_arginfo_auto_open_stub)
 PHP_FE(inmemory_open,swig_arginfo_inmemory_open)
 ZEND_NAMED_FE(chert_open,_wrap_chert_open,swig_arginfo_chert_open)
 ZEND_NAMED_FE(remote_open,_wrap_remote_open,swig_arginfo_remote_open)
 ZEND_NAMED_FE(remote_open_writable,_wrap_remote_open_writable,swig_arginfo_remote_open_writable)
 PHP_FE(BAD_VALUENO_get,swig_arginfo_BAD_VALUENO_get)
 ZEND_FE_END
};

static const zend_function_entry class_Xapian_functions[] = {
 PHP_ME(Xapian,version_string,swig_arginfo_version_string,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 PHP_ME(Xapian,major_version,swig_arginfo_major_version,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 PHP_ME(Xapian,minor_version,swig_arginfo_minor_version,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 PHP_ME(Xapian,revision,swig_arginfo_revision,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 PHP_ME(Xapian,sortable_serialise,swig_arginfo_sortable_serialise,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 PHP_ME(Xapian,sortable_unserialise,swig_arginfo_sortable_unserialise,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 PHP_ME(Xapian,miles_to_metres,swig_arginfo_miles_to_metres,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 PHP_ME(Xapian,metres_to_miles,swig_arginfo_metres_to_miles,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 ZEND_NAMED_ME(auto_open_stub,_wrap_auto_open_stub,swig_arginfo_auto_open_stub,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 PHP_ME(Xapian,inmemory_open,swig_arginfo_inmemory_open,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 ZEND_NAMED_ME(chert_open,_wrap_chert_open,swig_arginfo_chert_open,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 ZEND_NAMED_ME(remote_open,_wrap_remote_open,swig_arginfo_remote_open,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 ZEND_NAMED_ME(remote_open_writable,_wrap_remote_open_writable,swig_arginfo_remote_open_writable,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 PHP_ME(Xapian,BAD_VALUENO_get,swig_arginfo_BAD_VALUENO_get,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
 ZEND_FE_END
};

/* init section */
zend_module_entry xapian_module_entry = {
    STANDARD_MODULE_HEADER,
    "xapian",
    module_xapian_functions,
    PHP_MINIT(xapian),
    NULL, /* No MSHUTDOWN code */
    PHP_RINIT(xapian),
    NULL, /* No RSHUTDOWN code */
    PHP_MINFO(xapian),
    "1.4.32",
    STANDARD_MODULE_PROPERTIES
};

#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

#ifndef SWIG_INIT_CLIENT_DATA_TYPE
#define SWIG_INIT_CLIENT_DATA_TYPE void *
#endif

SWIGRUNTIME void
SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int init;

  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }

  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);

    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }

  /* When multiple interpreters are used, a module could have already been initialized in
     a different interpreter, but not yet have a pointer in this interpreter.
     In this case, we do not want to continue adding types... everything should be
     set up already */
  if (init == 0) return;

  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;

#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
#endif

    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
	type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }

    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {

      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
	if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
	if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
	  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
	  cast->type = ret;
	  ret = 0;
	} else {
	  /* Check for casting already in the list */
	  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
	  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
	  if (!ocast) ret = 0;
	}
      }

      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
	printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;

#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
  printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;

  if (init_run) return;
  init_run = 1;

  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
            SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{ /* c-mode */
#endif
}
#endif


SWIG_php_minit {
  zend_class_entry SWIGUNUSED internal_ce;
  SWIG_InitializeModule((void*)&module_number);
#if PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION == 0
  /* This hack is needed to avoid segfaults. */
  EG(class_table) = CG(class_table);
#endif

  /* oinit subsection */
  INIT_CLASS_ENTRY(internal_ce, "Xapian", class_Xapian_functions);
  SWIG_Php_ce_Xapian = zend_register_internal_class(&internal_ce);

  INIT_CLASS_ENTRY(internal_ce, "XapianPositionIterator", class_PositionIterator_functions);
  SWIG_Php_ce_PositionIterator = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_PositionIterator->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  INIT_CLASS_ENTRY(SWIG_Php_swig_wrapped_interface_ce, "SWIG\\wrapped", NULL);
  zend_do_implement_interface(SWIG_Php_ce_PositionIterator, &SWIG_Php_swig_wrapped_interface_ce);
#ifdef SWIG_PHP_INTERFACE_Iterator_CE
  zend_do_implement_interface(SWIG_Php_ce_PositionIterator, SWIG_PHP_INTERFACE_Iterator_CE);
#endif
  Swig_Php_base_object_handlers = *zend_get_std_object_handlers();
  Swig_Php_base_object_handlers.offset = XtOffsetOf(swig_object_wrapper, std);
  Swig_Php_base_object_handlers.clone_obj = NULL;
  SWIG_Php_ce_PositionIterator->create_object = SWIG_Php_create_object_PositionIterator;
  PositionIterator_object_handlers = Swig_Php_base_object_handlers;
  PositionIterator_object_handlers.free_obj = SWIG_Php_free_obj_PositionIterator;
#ifdef SWIGTYPE_p_Xapian__PositionIterator
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PositionIterator,SWIG_Php_ce_PositionIterator);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianPostingIterator", class_PostingIterator_functions);
  SWIG_Php_ce_PostingIterator = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_PostingIterator->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_PostingIterator, &SWIG_Php_swig_wrapped_interface_ce);
#ifdef SWIG_PHP_INTERFACE_Iterator_CE
  zend_do_implement_interface(SWIG_Php_ce_PostingIterator, SWIG_PHP_INTERFACE_Iterator_CE);
#endif
  SWIG_Php_ce_PostingIterator->create_object = SWIG_Php_create_object_PostingIterator;
  PostingIterator_object_handlers = Swig_Php_base_object_handlers;
  PostingIterator_object_handlers.free_obj = SWIG_Php_free_obj_PostingIterator;
#ifdef SWIGTYPE_p_Xapian__PostingIterator
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PostingIterator,SWIG_Php_ce_PostingIterator);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianTermIterator", class_TermIterator_functions);
  SWIG_Php_ce_TermIterator = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_TermIterator->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_TermIterator, &SWIG_Php_swig_wrapped_interface_ce);
#ifdef SWIG_PHP_INTERFACE_Iterator_CE
  zend_do_implement_interface(SWIG_Php_ce_TermIterator, SWIG_PHP_INTERFACE_Iterator_CE);
#endif
  SWIG_Php_ce_TermIterator->create_object = SWIG_Php_create_object_TermIterator;
  TermIterator_object_handlers = Swig_Php_base_object_handlers;
  TermIterator_object_handlers.free_obj = SWIG_Php_free_obj_TermIterator;
#ifdef SWIGTYPE_p_Xapian__TermIterator
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TermIterator,SWIG_Php_ce_TermIterator);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianValueIterator", class_ValueIterator_functions);
  SWIG_Php_ce_ValueIterator = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ValueIterator->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ValueIterator, &SWIG_Php_swig_wrapped_interface_ce);
#ifdef SWIG_PHP_INTERFACE_Iterator_CE
  zend_do_implement_interface(SWIG_Php_ce_ValueIterator, SWIG_PHP_INTERFACE_Iterator_CE);
#endif
  SWIG_Php_ce_ValueIterator->create_object = SWIG_Php_create_object_ValueIterator;
  ValueIterator_object_handlers = Swig_Php_base_object_handlers;
  ValueIterator_object_handlers.free_obj = SWIG_Php_free_obj_ValueIterator;
#ifdef SWIGTYPE_p_Xapian__ValueIterator
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueIterator,SWIG_Php_ce_ValueIterator);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianDocument", class_Document_functions);
  SWIG_Php_ce_Document = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_Document->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_Document, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_Document->create_object = SWIG_Php_create_object_Document;
  Document_object_handlers = Swig_Php_base_object_handlers;
  Document_object_handlers.free_obj = SWIG_Php_free_obj_Document;
#ifdef SWIGTYPE_p_Xapian__Document
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Document,SWIG_Php_ce_Document);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianRegistry", class_Registry_functions);
  SWIG_Php_ce_Registry = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_Registry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_Registry, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_Registry->create_object = SWIG_Php_create_object_Registry;
  Registry_object_handlers = Swig_Php_base_object_handlers;
  Registry_object_handlers.free_obj = SWIG_Php_free_obj_Registry;
#ifdef SWIGTYPE_p_Xapian__Registry
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Registry,SWIG_Php_ce_Registry);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianQuery", class_Query_functions);
  SWIG_Php_ce_Query = zend_register_internal_class(&internal_ce);
{ zval z; ZVAL_EMPTY_ARRAY(&z); zend_declare_property(SWIG_Php_ce_Query, "_ps", 3, &z, ZEND_ACC_PRIVATE); }
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_Query->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_Query, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_Query->create_object = SWIG_Php_create_object_Query;
  Query_object_handlers = Swig_Php_base_object_handlers;
  Query_object_handlers.free_obj = SWIG_Php_free_obj_Query;
#ifdef SWIGTYPE_p_Xapian__Query
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Query,SWIG_Php_ce_Query);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianStemImplementation", class_StemImplementation_functions);
  SWIG_Php_ce_StemImplementation = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_StemImplementation->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_StemImplementation->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_StemImplementation, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_StemImplementation->create_object = SWIG_Php_create_object_StemImplementation;
  StemImplementation_object_handlers = Swig_Php_base_object_handlers;
  StemImplementation_object_handlers.free_obj = SWIG_Php_free_obj_StemImplementation;
#ifdef SWIGTYPE_p_Xapian__StemImplementation
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__StemImplementation,SWIG_Php_ce_StemImplementation);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianStem", class_Stem_functions);
  SWIG_Php_ce_Stem = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_Stem->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_Stem, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_Stem->create_object = SWIG_Php_create_object_Stem;
  Stem_object_handlers = Swig_Php_base_object_handlers;
  Stem_object_handlers.free_obj = SWIG_Php_free_obj_Stem;
#ifdef SWIGTYPE_p_Xapian__Stem
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Stem,SWIG_Php_ce_Stem);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianTermGenerator", class_TermGenerator_functions);
  SWIG_Php_ce_TermGenerator = zend_register_internal_class(&internal_ce);
zend_declare_property_null(SWIG_Php_ce_TermGenerator, "_stopper", 8, ZEND_ACC_PRIVATE);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_TermGenerator->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_TermGenerator, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_TermGenerator->create_object = SWIG_Php_create_object_TermGenerator;
  TermGenerator_object_handlers = Swig_Php_base_object_handlers;
  TermGenerator_object_handlers.free_obj = SWIG_Php_free_obj_TermGenerator;
#ifdef SWIGTYPE_p_Xapian__TermGenerator
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TermGenerator,SWIG_Php_ce_TermGenerator);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianMSet", class_MSet_functions);
  SWIG_Php_ce_MSet = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_MSet->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_MSet, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_MSet->create_object = SWIG_Php_create_object_MSet;
  MSet_object_handlers = Swig_Php_base_object_handlers;
  MSet_object_handlers.free_obj = SWIG_Php_free_obj_MSet;
#ifdef SWIGTYPE_p_Xapian__MSet
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MSet,SWIG_Php_ce_MSet);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianMSetIterator", class_MSetIterator_functions);
  SWIG_Php_ce_MSetIterator = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_MSetIterator->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_MSetIterator, &SWIG_Php_swig_wrapped_interface_ce);
#ifdef SWIG_PHP_INTERFACE_Iterator_CE
  zend_do_implement_interface(SWIG_Php_ce_MSetIterator, SWIG_PHP_INTERFACE_Iterator_CE);
#endif
  SWIG_Php_ce_MSetIterator->create_object = SWIG_Php_create_object_MSetIterator;
  MSetIterator_object_handlers = Swig_Php_base_object_handlers;
  MSetIterator_object_handlers.free_obj = SWIG_Php_free_obj_MSetIterator;
#ifdef SWIGTYPE_p_Xapian__MSetIterator
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MSetIterator,SWIG_Php_ce_MSetIterator);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianESet", class_ESet_functions);
  SWIG_Php_ce_ESet = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ESet->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ESet, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_ESet->create_object = SWIG_Php_create_object_ESet;
  ESet_object_handlers = Swig_Php_base_object_handlers;
  ESet_object_handlers.free_obj = SWIG_Php_free_obj_ESet;
#ifdef SWIGTYPE_p_Xapian__ESet
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ESet,SWIG_Php_ce_ESet);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianESetIterator", class_ESetIterator_functions);
  SWIG_Php_ce_ESetIterator = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ESetIterator->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ESetIterator, &SWIG_Php_swig_wrapped_interface_ce);
#ifdef SWIG_PHP_INTERFACE_Iterator_CE
  zend_do_implement_interface(SWIG_Php_ce_ESetIterator, SWIG_PHP_INTERFACE_Iterator_CE);
#endif
  SWIG_Php_ce_ESetIterator->create_object = SWIG_Php_create_object_ESetIterator;
  ESetIterator_object_handlers = Swig_Php_base_object_handlers;
  ESetIterator_object_handlers.free_obj = SWIG_Php_free_obj_ESetIterator;
#ifdef SWIGTYPE_p_Xapian__ESetIterator
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ESetIterator,SWIG_Php_ce_ESetIterator);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianRSet", class_RSet_functions);
  SWIG_Php_ce_RSet = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_RSet->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_RSet, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_RSet->create_object = SWIG_Php_create_object_RSet;
  RSet_object_handlers = Swig_Php_base_object_handlers;
  RSet_object_handlers.free_obj = SWIG_Php_free_obj_RSet;
#ifdef SWIGTYPE_p_Xapian__RSet
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__RSet,SWIG_Php_ce_RSet);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianMatchDecider", class_MatchDecider_functions);
  SWIG_Php_ce_MatchDecider = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_MatchDecider->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_MatchDecider->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_MatchDecider, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_MatchDecider->create_object = SWIG_Php_create_object_MatchDecider;
  MatchDecider_object_handlers = Swig_Php_base_object_handlers;
  MatchDecider_object_handlers.free_obj = SWIG_Php_free_obj_MatchDecider;
#ifdef SWIGTYPE_p_Xapian__MatchDecider
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MatchDecider,SWIG_Php_ce_MatchDecider);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianEnquire", class_Enquire_functions);
  SWIG_Php_ce_Enquire = zend_register_internal_class(&internal_ce);
{ zval z; ZVAL_EMPTY_ARRAY(&z); zend_declare_property(SWIG_Php_ce_Enquire, "_ps", 3, &z, ZEND_ACC_PRIVATE); }
zend_declare_property_null(SWIG_Php_ce_Enquire, "_sorter", 7, ZEND_ACC_PRIVATE);
{ zval z; ZVAL_EMPTY_ARRAY(&z); zend_declare_property(SWIG_Php_ce_Enquire, "_spies", 6, &z, ZEND_ACC_PRIVATE); }
zend_declare_property_null(SWIG_Php_ce_Enquire, "_query", 7, ZEND_ACC_PRIVATE);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_Enquire->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_Enquire, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_Enquire->create_object = SWIG_Php_create_object_Enquire;
  Enquire_object_handlers = Swig_Php_base_object_handlers;
  Enquire_object_handlers.free_obj = SWIG_Php_free_obj_Enquire;
#ifdef SWIGTYPE_p_Xapian__Enquire
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Enquire,SWIG_Php_ce_Enquire);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianExpandDecider", class_ExpandDecider_functions);
  SWIG_Php_ce_ExpandDecider = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_ExpandDecider->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ExpandDecider->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ExpandDecider, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_ExpandDecider->create_object = SWIG_Php_create_object_ExpandDecider;
  ExpandDecider_object_handlers = Swig_Php_base_object_handlers;
  ExpandDecider_object_handlers.free_obj = SWIG_Php_free_obj_ExpandDecider;
#ifdef SWIGTYPE_p_Xapian__ExpandDecider
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDecider,SWIG_Php_ce_ExpandDecider);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianExpandDeciderAnd", class_ExpandDeciderAnd_functions);
  SWIG_Php_ce_ExpandDeciderAnd = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_ExpandDecider);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ExpandDeciderAnd->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ExpandDeciderAnd, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_ExpandDeciderAnd->create_object = SWIG_Php_create_object_ExpandDeciderAnd;
  ExpandDeciderAnd_object_handlers = Swig_Php_base_object_handlers;
  ExpandDeciderAnd_object_handlers.free_obj = SWIG_Php_free_obj_ExpandDeciderAnd;
#ifdef SWIGTYPE_p_Xapian__ExpandDeciderAnd
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDeciderAnd,SWIG_Php_ce_ExpandDeciderAnd);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianExpandDeciderFilterPrefix", class_ExpandDeciderFilterPrefix_functions);
  SWIG_Php_ce_ExpandDeciderFilterPrefix = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_ExpandDecider);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ExpandDeciderFilterPrefix->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ExpandDeciderFilterPrefix, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_ExpandDeciderFilterPrefix->create_object = SWIG_Php_create_object_ExpandDeciderFilterPrefix;
  ExpandDeciderFilterPrefix_object_handlers = Swig_Php_base_object_handlers;
  ExpandDeciderFilterPrefix_object_handlers.free_obj = SWIG_Php_free_obj_ExpandDeciderFilterPrefix;
#ifdef SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix,SWIG_Php_ce_ExpandDeciderFilterPrefix);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianKeyMaker", class_KeyMaker_functions);
  SWIG_Php_ce_KeyMaker = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_KeyMaker->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_KeyMaker->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_KeyMaker, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_KeyMaker->create_object = SWIG_Php_create_object_KeyMaker;
  KeyMaker_object_handlers = Swig_Php_base_object_handlers;
  KeyMaker_object_handlers.free_obj = SWIG_Php_free_obj_KeyMaker;
#ifdef SWIGTYPE_p_Xapian__KeyMaker
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__KeyMaker,SWIG_Php_ce_KeyMaker);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianMultiValueKeyMaker", class_MultiValueKeyMaker_functions);
  SWIG_Php_ce_MultiValueKeyMaker = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_KeyMaker);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_MultiValueKeyMaker->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_MultiValueKeyMaker, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_MultiValueKeyMaker->create_object = SWIG_Php_create_object_MultiValueKeyMaker;
  MultiValueKeyMaker_object_handlers = Swig_Php_base_object_handlers;
  MultiValueKeyMaker_object_handlers.free_obj = SWIG_Php_free_obj_MultiValueKeyMaker;
#ifdef SWIGTYPE_p_Xapian__MultiValueKeyMaker
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MultiValueKeyMaker,SWIG_Php_ce_MultiValueKeyMaker);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianStopper", class_Stopper_functions);
  SWIG_Php_ce_Stopper = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_Stopper->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_Stopper->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_Stopper, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_Stopper->create_object = SWIG_Php_create_object_Stopper;
  Stopper_object_handlers = Swig_Php_base_object_handlers;
  Stopper_object_handlers.free_obj = SWIG_Php_free_obj_Stopper;
#ifdef SWIGTYPE_p_Xapian__Stopper
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Stopper,SWIG_Php_ce_Stopper);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianSimpleStopper", class_SimpleStopper_functions);
  SWIG_Php_ce_SimpleStopper = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Stopper);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_SimpleStopper->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_SimpleStopper, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_SimpleStopper->create_object = SWIG_Php_create_object_SimpleStopper;
  SimpleStopper_object_handlers = Swig_Php_base_object_handlers;
  SimpleStopper_object_handlers.free_obj = SWIG_Php_free_obj_SimpleStopper;
#ifdef SWIGTYPE_p_Xapian__SimpleStopper
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__SimpleStopper,SWIG_Php_ce_SimpleStopper);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianRangeProcessor", class_RangeProcessor_functions);
  SWIG_Php_ce_RangeProcessor = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_RangeProcessor->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_RangeProcessor, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_RangeProcessor->create_object = SWIG_Php_create_object_RangeProcessor;
  RangeProcessor_object_handlers = Swig_Php_base_object_handlers;
  RangeProcessor_object_handlers.free_obj = SWIG_Php_free_obj_RangeProcessor;
#ifdef SWIGTYPE_p_Xapian__RangeProcessor
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__RangeProcessor,SWIG_Php_ce_RangeProcessor);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianDateRangeProcessor", class_DateRangeProcessor_functions);
  SWIG_Php_ce_DateRangeProcessor = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_RangeProcessor);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_DateRangeProcessor->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_DateRangeProcessor, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_DateRangeProcessor->create_object = SWIG_Php_create_object_DateRangeProcessor;
  DateRangeProcessor_object_handlers = Swig_Php_base_object_handlers;
  DateRangeProcessor_object_handlers.free_obj = SWIG_Php_free_obj_DateRangeProcessor;
#ifdef SWIGTYPE_p_Xapian__DateRangeProcessor
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DateRangeProcessor,SWIG_Php_ce_DateRangeProcessor);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianNumberRangeProcessor", class_NumberRangeProcessor_functions);
  SWIG_Php_ce_NumberRangeProcessor = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_RangeProcessor);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_NumberRangeProcessor->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_NumberRangeProcessor, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_NumberRangeProcessor->create_object = SWIG_Php_create_object_NumberRangeProcessor;
  NumberRangeProcessor_object_handlers = Swig_Php_base_object_handlers;
  NumberRangeProcessor_object_handlers.free_obj = SWIG_Php_free_obj_NumberRangeProcessor;
#ifdef SWIGTYPE_p_Xapian__NumberRangeProcessor
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__NumberRangeProcessor,SWIG_Php_ce_NumberRangeProcessor);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianValueRangeProcessor", class_ValueRangeProcessor_functions);
  SWIG_Php_ce_ValueRangeProcessor = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_ValueRangeProcessor->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ValueRangeProcessor->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ValueRangeProcessor, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_ValueRangeProcessor->create_object = SWIG_Php_create_object_ValueRangeProcessor;
  ValueRangeProcessor_object_handlers = Swig_Php_base_object_handlers;
  ValueRangeProcessor_object_handlers.free_obj = SWIG_Php_free_obj_ValueRangeProcessor;
#ifdef SWIGTYPE_p_Xapian__ValueRangeProcessor
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueRangeProcessor,SWIG_Php_ce_ValueRangeProcessor);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianStringValueRangeProcessor", class_StringValueRangeProcessor_functions);
  SWIG_Php_ce_StringValueRangeProcessor = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_ValueRangeProcessor);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_StringValueRangeProcessor->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_StringValueRangeProcessor, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_StringValueRangeProcessor->create_object = SWIG_Php_create_object_StringValueRangeProcessor;
  StringValueRangeProcessor_object_handlers = Swig_Php_base_object_handlers;
  StringValueRangeProcessor_object_handlers.free_obj = SWIG_Php_free_obj_StringValueRangeProcessor;
#ifdef SWIGTYPE_p_Xapian__StringValueRangeProcessor
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__StringValueRangeProcessor,SWIG_Php_ce_StringValueRangeProcessor);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianDateValueRangeProcessor", class_DateValueRangeProcessor_functions);
  SWIG_Php_ce_DateValueRangeProcessor = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_StringValueRangeProcessor);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_DateValueRangeProcessor->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_DateValueRangeProcessor, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_DateValueRangeProcessor->create_object = SWIG_Php_create_object_DateValueRangeProcessor;
  DateValueRangeProcessor_object_handlers = Swig_Php_base_object_handlers;
  DateValueRangeProcessor_object_handlers.free_obj = SWIG_Php_free_obj_DateValueRangeProcessor;
#ifdef SWIGTYPE_p_Xapian__DateValueRangeProcessor
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DateValueRangeProcessor,SWIG_Php_ce_DateValueRangeProcessor);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianNumberValueRangeProcessor", class_NumberValueRangeProcessor_functions);
  SWIG_Php_ce_NumberValueRangeProcessor = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_StringValueRangeProcessor);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_NumberValueRangeProcessor->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_NumberValueRangeProcessor, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_NumberValueRangeProcessor->create_object = SWIG_Php_create_object_NumberValueRangeProcessor;
  NumberValueRangeProcessor_object_handlers = Swig_Php_base_object_handlers;
  NumberValueRangeProcessor_object_handlers.free_obj = SWIG_Php_free_obj_NumberValueRangeProcessor;
#ifdef SWIGTYPE_p_Xapian__NumberValueRangeProcessor
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__NumberValueRangeProcessor,SWIG_Php_ce_NumberValueRangeProcessor);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianFieldProcessor", class_FieldProcessor_functions);
  SWIG_Php_ce_FieldProcessor = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_FieldProcessor->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_FieldProcessor->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_FieldProcessor, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_FieldProcessor->create_object = SWIG_Php_create_object_FieldProcessor;
  FieldProcessor_object_handlers = Swig_Php_base_object_handlers;
  FieldProcessor_object_handlers.free_obj = SWIG_Php_free_obj_FieldProcessor;
#ifdef SWIGTYPE_p_Xapian__FieldProcessor
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__FieldProcessor,SWIG_Php_ce_FieldProcessor);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianQueryParser", class_QueryParser_functions);
  SWIG_Php_ce_QueryParser = zend_register_internal_class(&internal_ce);
{ zval z; ZVAL_EMPTY_ARRAY(&z); zend_declare_property(SWIG_Php_ce_QueryParser, "_procs", 6, &z, ZEND_ACC_PRIVATE); }
zend_declare_property_null(SWIG_Php_ce_QueryParser, "_stopper", 8, ZEND_ACC_PRIVATE);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_QueryParser->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_QueryParser, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_QueryParser->create_object = SWIG_Php_create_object_QueryParser;
  QueryParser_object_handlers = Swig_Php_base_object_handlers;
  QueryParser_object_handlers.free_obj = SWIG_Php_free_obj_QueryParser;
#ifdef SWIGTYPE_p_Xapian__QueryParser
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__QueryParser,SWIG_Php_ce_QueryParser);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianValueSetMatchDecider", class_ValueSetMatchDecider_functions);
  SWIG_Php_ce_ValueSetMatchDecider = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_MatchDecider);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ValueSetMatchDecider->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ValueSetMatchDecider, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_ValueSetMatchDecider->create_object = SWIG_Php_create_object_ValueSetMatchDecider;
  ValueSetMatchDecider_object_handlers = Swig_Php_base_object_handlers;
  ValueSetMatchDecider_object_handlers.free_obj = SWIG_Php_free_obj_ValueSetMatchDecider;
#ifdef SWIGTYPE_p_Xapian__ValueSetMatchDecider
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueSetMatchDecider,SWIG_Php_ce_ValueSetMatchDecider);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianWeight", class_Weight_functions);
  SWIG_Php_ce_Weight = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_Weight->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_Weight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_Weight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_Weight->create_object = SWIG_Php_create_object_Weight;
  Weight_object_handlers = Swig_Php_base_object_handlers;
  Weight_object_handlers.free_obj = SWIG_Php_free_obj_Weight;
#ifdef SWIGTYPE_p_Xapian__Weight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Weight,SWIG_Php_ce_Weight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianBoolWeight", class_BoolWeight_functions);
  SWIG_Php_ce_BoolWeight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_BoolWeight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_BoolWeight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_BoolWeight->create_object = SWIG_Php_create_object_BoolWeight;
  BoolWeight_object_handlers = Swig_Php_base_object_handlers;
  BoolWeight_object_handlers.free_obj = SWIG_Php_free_obj_BoolWeight;
#ifdef SWIGTYPE_p_Xapian__BoolWeight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__BoolWeight,SWIG_Php_ce_BoolWeight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianTfIdfWeight", class_TfIdfWeight_functions);
  SWIG_Php_ce_TfIdfWeight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_TfIdfWeight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_TfIdfWeight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_TfIdfWeight->create_object = SWIG_Php_create_object_TfIdfWeight;
  TfIdfWeight_object_handlers = Swig_Php_base_object_handlers;
  TfIdfWeight_object_handlers.free_obj = SWIG_Php_free_obj_TfIdfWeight;
#ifdef SWIGTYPE_p_Xapian__TfIdfWeight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TfIdfWeight,SWIG_Php_ce_TfIdfWeight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianBM25Weight", class_BM25Weight_functions);
  SWIG_Php_ce_BM25Weight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_BM25Weight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_BM25Weight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_BM25Weight->create_object = SWIG_Php_create_object_BM25Weight;
  BM25Weight_object_handlers = Swig_Php_base_object_handlers;
  BM25Weight_object_handlers.free_obj = SWIG_Php_free_obj_BM25Weight;
#ifdef SWIGTYPE_p_Xapian__BM25Weight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__BM25Weight,SWIG_Php_ce_BM25Weight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianBM25PlusWeight", class_BM25PlusWeight_functions);
  SWIG_Php_ce_BM25PlusWeight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_BM25PlusWeight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_BM25PlusWeight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_BM25PlusWeight->create_object = SWIG_Php_create_object_BM25PlusWeight;
  BM25PlusWeight_object_handlers = Swig_Php_base_object_handlers;
  BM25PlusWeight_object_handlers.free_obj = SWIG_Php_free_obj_BM25PlusWeight;
#ifdef SWIGTYPE_p_Xapian__BM25PlusWeight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__BM25PlusWeight,SWIG_Php_ce_BM25PlusWeight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianTradWeight", class_TradWeight_functions);
  SWIG_Php_ce_TradWeight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_TradWeight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_TradWeight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_TradWeight->create_object = SWIG_Php_create_object_TradWeight;
  TradWeight_object_handlers = Swig_Php_base_object_handlers;
  TradWeight_object_handlers.free_obj = SWIG_Php_free_obj_TradWeight;
#ifdef SWIGTYPE_p_Xapian__TradWeight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TradWeight,SWIG_Php_ce_TradWeight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianInL2Weight", class_InL2Weight_functions);
  SWIG_Php_ce_InL2Weight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_InL2Weight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_InL2Weight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_InL2Weight->create_object = SWIG_Php_create_object_InL2Weight;
  InL2Weight_object_handlers = Swig_Php_base_object_handlers;
  InL2Weight_object_handlers.free_obj = SWIG_Php_free_obj_InL2Weight;
#ifdef SWIGTYPE_p_Xapian__InL2Weight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__InL2Weight,SWIG_Php_ce_InL2Weight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianIfB2Weight", class_IfB2Weight_functions);
  SWIG_Php_ce_IfB2Weight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_IfB2Weight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_IfB2Weight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_IfB2Weight->create_object = SWIG_Php_create_object_IfB2Weight;
  IfB2Weight_object_handlers = Swig_Php_base_object_handlers;
  IfB2Weight_object_handlers.free_obj = SWIG_Php_free_obj_IfB2Weight;
#ifdef SWIGTYPE_p_Xapian__IfB2Weight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__IfB2Weight,SWIG_Php_ce_IfB2Weight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianIneB2Weight", class_IneB2Weight_functions);
  SWIG_Php_ce_IneB2Weight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_IneB2Weight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_IneB2Weight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_IneB2Weight->create_object = SWIG_Php_create_object_IneB2Weight;
  IneB2Weight_object_handlers = Swig_Php_base_object_handlers;
  IneB2Weight_object_handlers.free_obj = SWIG_Php_free_obj_IneB2Weight;
#ifdef SWIGTYPE_p_Xapian__IneB2Weight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__IneB2Weight,SWIG_Php_ce_IneB2Weight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianBB2Weight", class_BB2Weight_functions);
  SWIG_Php_ce_BB2Weight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_BB2Weight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_BB2Weight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_BB2Weight->create_object = SWIG_Php_create_object_BB2Weight;
  BB2Weight_object_handlers = Swig_Php_base_object_handlers;
  BB2Weight_object_handlers.free_obj = SWIG_Php_free_obj_BB2Weight;
#ifdef SWIGTYPE_p_Xapian__BB2Weight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__BB2Weight,SWIG_Php_ce_BB2Weight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianDLHWeight", class_DLHWeight_functions);
  SWIG_Php_ce_DLHWeight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_DLHWeight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_DLHWeight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_DLHWeight->create_object = SWIG_Php_create_object_DLHWeight;
  DLHWeight_object_handlers = Swig_Php_base_object_handlers;
  DLHWeight_object_handlers.free_obj = SWIG_Php_free_obj_DLHWeight;
#ifdef SWIGTYPE_p_Xapian__DLHWeight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DLHWeight,SWIG_Php_ce_DLHWeight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianPL2Weight", class_PL2Weight_functions);
  SWIG_Php_ce_PL2Weight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_PL2Weight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_PL2Weight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_PL2Weight->create_object = SWIG_Php_create_object_PL2Weight;
  PL2Weight_object_handlers = Swig_Php_base_object_handlers;
  PL2Weight_object_handlers.free_obj = SWIG_Php_free_obj_PL2Weight;
#ifdef SWIGTYPE_p_Xapian__PL2Weight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PL2Weight,SWIG_Php_ce_PL2Weight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianPL2PlusWeight", class_PL2PlusWeight_functions);
  SWIG_Php_ce_PL2PlusWeight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_PL2PlusWeight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_PL2PlusWeight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_PL2PlusWeight->create_object = SWIG_Php_create_object_PL2PlusWeight;
  PL2PlusWeight_object_handlers = Swig_Php_base_object_handlers;
  PL2PlusWeight_object_handlers.free_obj = SWIG_Php_free_obj_PL2PlusWeight;
#ifdef SWIGTYPE_p_Xapian__PL2PlusWeight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PL2PlusWeight,SWIG_Php_ce_PL2PlusWeight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianDPHWeight", class_DPHWeight_functions);
  SWIG_Php_ce_DPHWeight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_DPHWeight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_DPHWeight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_DPHWeight->create_object = SWIG_Php_create_object_DPHWeight;
  DPHWeight_object_handlers = Swig_Php_base_object_handlers;
  DPHWeight_object_handlers.free_obj = SWIG_Php_free_obj_DPHWeight;
#ifdef SWIGTYPE_p_Xapian__DPHWeight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DPHWeight,SWIG_Php_ce_DPHWeight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianLMWeight", class_LMWeight_functions);
  SWIG_Php_ce_LMWeight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_LMWeight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_LMWeight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_LMWeight->create_object = SWIG_Php_create_object_LMWeight;
  LMWeight_object_handlers = Swig_Php_base_object_handlers;
  LMWeight_object_handlers.free_obj = SWIG_Php_free_obj_LMWeight;
#ifdef SWIGTYPE_p_Xapian__LMWeight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LMWeight,SWIG_Php_ce_LMWeight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianCoordWeight", class_CoordWeight_functions);
  SWIG_Php_ce_CoordWeight = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Weight);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_CoordWeight->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_CoordWeight, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_CoordWeight->create_object = SWIG_Php_create_object_CoordWeight;
  CoordWeight_object_handlers = Swig_Php_base_object_handlers;
  CoordWeight_object_handlers.free_obj = SWIG_Php_free_obj_CoordWeight;
#ifdef SWIGTYPE_p_Xapian__CoordWeight
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__CoordWeight,SWIG_Php_ce_CoordWeight);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianCompactor", class_Compactor_functions);
  SWIG_Php_ce_Compactor = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_Compactor->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_Compactor, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_Compactor->create_object = SWIG_Php_create_object_Compactor;
  Compactor_object_handlers = Swig_Php_base_object_handlers;
  Compactor_object_handlers.free_obj = SWIG_Php_free_obj_Compactor;
#ifdef SWIGTYPE_p_Xapian__Compactor
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Compactor,SWIG_Php_ce_Compactor);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianPostingSource", class_PostingSource_functions);
  SWIG_Php_ce_PostingSource = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_PostingSource->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_PostingSource->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_PostingSource, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_PostingSource->create_object = SWIG_Php_create_object_PostingSource;
  PostingSource_object_handlers = Swig_Php_base_object_handlers;
  PostingSource_object_handlers.free_obj = SWIG_Php_free_obj_PostingSource;
#ifdef SWIGTYPE_p_Xapian__PostingSource
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PostingSource,SWIG_Php_ce_PostingSource);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianValuePostingSource", class_ValuePostingSource_functions);
  SWIG_Php_ce_ValuePostingSource = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_PostingSource);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ValuePostingSource->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ValuePostingSource, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_ValuePostingSource->create_object = SWIG_Php_create_object_ValuePostingSource;
  ValuePostingSource_object_handlers = Swig_Php_base_object_handlers;
  ValuePostingSource_object_handlers.free_obj = SWIG_Php_free_obj_ValuePostingSource;
#ifdef SWIGTYPE_p_Xapian__ValuePostingSource
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValuePostingSource,SWIG_Php_ce_ValuePostingSource);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianValueWeightPostingSource", class_ValueWeightPostingSource_functions);
  SWIG_Php_ce_ValueWeightPostingSource = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_ValuePostingSource);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ValueWeightPostingSource->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ValueWeightPostingSource, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_ValueWeightPostingSource->create_object = SWIG_Php_create_object_ValueWeightPostingSource;
  ValueWeightPostingSource_object_handlers = Swig_Php_base_object_handlers;
  ValueWeightPostingSource_object_handlers.free_obj = SWIG_Php_free_obj_ValueWeightPostingSource;
#ifdef SWIGTYPE_p_Xapian__ValueWeightPostingSource
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueWeightPostingSource,SWIG_Php_ce_ValueWeightPostingSource);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianDecreasingValueWeightPostingSource", class_DecreasingValueWeightPostingSource_functions);
  SWIG_Php_ce_DecreasingValueWeightPostingSource = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_ValueWeightPostingSource);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_DecreasingValueWeightPostingSource->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_DecreasingValueWeightPostingSource, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_DecreasingValueWeightPostingSource->create_object = SWIG_Php_create_object_DecreasingValueWeightPostingSource;
  DecreasingValueWeightPostingSource_object_handlers = Swig_Php_base_object_handlers;
  DecreasingValueWeightPostingSource_object_handlers.free_obj = SWIG_Php_free_obj_DecreasingValueWeightPostingSource;
#ifdef SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource,SWIG_Php_ce_DecreasingValueWeightPostingSource);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianValueMapPostingSource", class_ValueMapPostingSource_functions);
  SWIG_Php_ce_ValueMapPostingSource = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_ValuePostingSource);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ValueMapPostingSource->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ValueMapPostingSource, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_ValueMapPostingSource->create_object = SWIG_Php_create_object_ValueMapPostingSource;
  ValueMapPostingSource_object_handlers = Swig_Php_base_object_handlers;
  ValueMapPostingSource_object_handlers.free_obj = SWIG_Php_free_obj_ValueMapPostingSource;
#ifdef SWIGTYPE_p_Xapian__ValueMapPostingSource
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueMapPostingSource,SWIG_Php_ce_ValueMapPostingSource);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianFixedWeightPostingSource", class_FixedWeightPostingSource_functions);
  SWIG_Php_ce_FixedWeightPostingSource = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_PostingSource);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_FixedWeightPostingSource->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_FixedWeightPostingSource, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_FixedWeightPostingSource->create_object = SWIG_Php_create_object_FixedWeightPostingSource;
  FixedWeightPostingSource_object_handlers = Swig_Php_base_object_handlers;
  FixedWeightPostingSource_object_handlers.free_obj = SWIG_Php_free_obj_FixedWeightPostingSource;
#ifdef SWIGTYPE_p_Xapian__FixedWeightPostingSource
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__FixedWeightPostingSource,SWIG_Php_ce_FixedWeightPostingSource);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianMatchSpy", class_MatchSpy_functions);
  SWIG_Php_ce_MatchSpy = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_MatchSpy->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_MatchSpy->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_MatchSpy, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_MatchSpy->create_object = SWIG_Php_create_object_MatchSpy;
  MatchSpy_object_handlers = Swig_Php_base_object_handlers;
  MatchSpy_object_handlers.free_obj = SWIG_Php_free_obj_MatchSpy;
#ifdef SWIGTYPE_p_Xapian__MatchSpy
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MatchSpy,SWIG_Php_ce_MatchSpy);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianValueCountMatchSpy", class_ValueCountMatchSpy_functions);
  SWIG_Php_ce_ValueCountMatchSpy = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_MatchSpy);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_ValueCountMatchSpy->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_ValueCountMatchSpy, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_ValueCountMatchSpy->create_object = SWIG_Php_create_object_ValueCountMatchSpy;
  ValueCountMatchSpy_object_handlers = Swig_Php_base_object_handlers;
  ValueCountMatchSpy_object_handlers.free_obj = SWIG_Php_free_obj_ValueCountMatchSpy;
#ifdef SWIGTYPE_p_Xapian__ValueCountMatchSpy
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueCountMatchSpy,SWIG_Php_ce_ValueCountMatchSpy);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianLatLongCoord", class_LatLongCoord_functions);
  SWIG_Php_ce_LatLongCoord = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_LatLongCoord->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_LatLongCoord, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_LatLongCoord->create_object = SWIG_Php_create_object_LatLongCoord;
  LatLongCoord_object_handlers = Swig_Php_base_object_handlers;
  LatLongCoord_object_handlers.free_obj = SWIG_Php_free_obj_LatLongCoord;
#ifdef SWIGTYPE_p_Xapian__LatLongCoord
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoord,SWIG_Php_ce_LatLongCoord);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianLatLongCoordsIterator", class_LatLongCoordsIterator_functions);
  SWIG_Php_ce_LatLongCoordsIterator = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_LatLongCoordsIterator->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_LatLongCoordsIterator, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_LatLongCoordsIterator->create_object = SWIG_Php_create_object_LatLongCoordsIterator;
  LatLongCoordsIterator_object_handlers = Swig_Php_base_object_handlers;
  LatLongCoordsIterator_object_handlers.free_obj = SWIG_Php_free_obj_LatLongCoordsIterator;
#ifdef SWIGTYPE_p_Xapian__LatLongCoordsIterator
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoordsIterator,SWIG_Php_ce_LatLongCoordsIterator);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianLatLongCoords", class_LatLongCoords_functions);
  SWIG_Php_ce_LatLongCoords = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_LatLongCoords->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_LatLongCoords, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_LatLongCoords->create_object = SWIG_Php_create_object_LatLongCoords;
  LatLongCoords_object_handlers = Swig_Php_base_object_handlers;
  LatLongCoords_object_handlers.free_obj = SWIG_Php_free_obj_LatLongCoords;
#ifdef SWIGTYPE_p_Xapian__LatLongCoords
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoords,SWIG_Php_ce_LatLongCoords);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianLatLongMetric", class_LatLongMetric_functions);
  SWIG_Php_ce_LatLongMetric = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce_LatLongMetric->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_LatLongMetric->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_LatLongMetric, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_LatLongMetric->create_object = SWIG_Php_create_object_LatLongMetric;
  LatLongMetric_object_handlers = Swig_Php_base_object_handlers;
  LatLongMetric_object_handlers.free_obj = SWIG_Php_free_obj_LatLongMetric;
#ifdef SWIGTYPE_p_Xapian__LatLongMetric
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongMetric,SWIG_Php_ce_LatLongMetric);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianGreatCircleMetric", class_GreatCircleMetric_functions);
  SWIG_Php_ce_GreatCircleMetric = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_LatLongMetric);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_GreatCircleMetric->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_GreatCircleMetric, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_GreatCircleMetric->create_object = SWIG_Php_create_object_GreatCircleMetric;
  GreatCircleMetric_object_handlers = Swig_Php_base_object_handlers;
  GreatCircleMetric_object_handlers.free_obj = SWIG_Php_free_obj_GreatCircleMetric;
#ifdef SWIGTYPE_p_Xapian__GreatCircleMetric
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__GreatCircleMetric,SWIG_Php_ce_GreatCircleMetric);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianLatLongDistancePostingSource", class_LatLongDistancePostingSource_functions);
  SWIG_Php_ce_LatLongDistancePostingSource = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_ValuePostingSource);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_LatLongDistancePostingSource->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_LatLongDistancePostingSource, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_LatLongDistancePostingSource->create_object = SWIG_Php_create_object_LatLongDistancePostingSource;
  LatLongDistancePostingSource_object_handlers = Swig_Php_base_object_handlers;
  LatLongDistancePostingSource_object_handlers.free_obj = SWIG_Php_free_obj_LatLongDistancePostingSource;
#ifdef SWIGTYPE_p_Xapian__LatLongDistancePostingSource
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongDistancePostingSource,SWIG_Php_ce_LatLongDistancePostingSource);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianLatLongDistanceKeyMaker", class_LatLongDistanceKeyMaker_functions);
  SWIG_Php_ce_LatLongDistanceKeyMaker = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_KeyMaker);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_LatLongDistanceKeyMaker->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_LatLongDistanceKeyMaker, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_LatLongDistanceKeyMaker->create_object = SWIG_Php_create_object_LatLongDistanceKeyMaker;
  LatLongDistanceKeyMaker_object_handlers = Swig_Php_base_object_handlers;
  LatLongDistanceKeyMaker_object_handlers.free_obj = SWIG_Php_free_obj_LatLongDistanceKeyMaker;
#ifdef SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker,SWIG_Php_ce_LatLongDistanceKeyMaker);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianDatabase", class_Database_functions);
  SWIG_Php_ce_Database = zend_register_internal_class(&internal_ce);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_Database->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_Database, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_Database->create_object = SWIG_Php_create_object_Database;
  Database_object_handlers = Swig_Php_base_object_handlers;
  Database_object_handlers.free_obj = SWIG_Php_free_obj_Database;
#ifdef SWIGTYPE_p_Xapian__Database
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Database,SWIG_Php_ce_Database);
#endif

  INIT_CLASS_ENTRY(internal_ce, "XapianWritableDatabase", class_WritableDatabase_functions);
  SWIG_Php_ce_WritableDatabase = zend_register_internal_class_ex(&internal_ce, SWIG_Php_ce_Database);
#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES
  SWIG_Php_ce_WritableDatabase->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
#endif
  zend_do_implement_interface(SWIG_Php_ce_WritableDatabase, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_Php_ce_WritableDatabase->create_object = SWIG_Php_create_object_WritableDatabase;
  WritableDatabase_object_handlers = Swig_Php_base_object_handlers;
  WritableDatabase_object_handlers.free_obj = SWIG_Php_free_obj_WritableDatabase;
#ifdef SWIGTYPE_p_Xapian__WritableDatabase
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__WritableDatabase,SWIG_Php_ce_WritableDatabase);
#endif


  /* Register classes to represent non-class pointer types */
  swig_ptr_object_handlers = *zend_get_std_object_handlers();
  swig_ptr_object_handlers.offset = XtOffsetOf(swig_object_wrapper, std);
  swig_ptr_object_handlers.cast_object = swig_ptr_cast_object;
  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_flags", NULL);
  SWIG_Php_ce__p_flags = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_flags->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_flags, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_flags,SWIG_Php_ce__p_flags);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_compaction_level", NULL);
  SWIG_Php_ce__p_compaction_level = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_compaction_level->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_compaction_level, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_compaction_level,SWIG_Php_ce__p_compaction_level);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_Query", NULL);
  SWIG_Php_ce__p_Query = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_Query->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_Query, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_Query,SWIG_Php_ce__p_Query);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_unsigned_int", NULL);
  SWIG_Php_ce__unsigned_int = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__unsigned_int->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__unsigned_int, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_unsigned_int,SWIG_Php_ce__unsigned_int);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_reference", NULL);
  SWIG_Php_ce__p_reference = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_reference->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_reference, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_reference,SWIG_Php_ce__p_reference);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_int", NULL);
  SWIG_Php_ce__p_int = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_int->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_int, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_int,SWIG_Php_ce__p_int);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_unsigned_int", NULL);
  SWIG_Php_ce__p_unsigned_int = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_unsigned_int->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_unsigned_int, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_unsigned_int,SWIG_Php_ce__p_unsigned_int);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_docid_order", NULL);
  SWIG_Php_ce__p_docid_order = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_docid_order->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_docid_order, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_docid_order,SWIG_Php_ce__p_docid_order);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_stem_strategy", NULL);
  SWIG_Php_ce__p_stem_strategy = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_stem_strategy->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_stem_strategy, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_stem_strategy,SWIG_Php_ce__p_stem_strategy);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_unsigned_long", NULL);
  SWIG_Php_ce__p_unsigned_long = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_unsigned_long->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_unsigned_long, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_unsigned_long,SWIG_Php_ce__p_unsigned_long);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_type_smoothing", NULL);
  SWIG_Php_ce__p_type_smoothing = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_type_smoothing->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_type_smoothing, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_type_smoothing,SWIG_Php_ce__p_type_smoothing);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_double", NULL);
  SWIG_Php_ce__p_double = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_double->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_double, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_double,SWIG_Php_ce__p_double);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_stop_strategy", NULL);
  SWIG_Php_ce__p_stop_strategy = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_stop_strategy->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_stop_strategy, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_stop_strategy,SWIG_Php_ce__p_stop_strategy);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_const_reference", NULL);
  SWIG_Php_ce__p_const_reference = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_const_reference->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_const_reference, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_const_reference,SWIG_Php_ce__p_const_reference);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_feature_flag", NULL);
  SWIG_Php_ce__p_feature_flag = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_feature_flag->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_feature_flag, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_feature_flag,SWIG_Php_ce__p_feature_flag);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_int", NULL);
  SWIG_Php_ce__int = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__int->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__int, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_int,SWIG_Php_ce__int);

  INIT_CLASS_ENTRY(internal_ce, "SWIG\\_p_std__string", NULL);
  SWIG_Php_ce__p_std__string = zend_register_internal_class(&internal_ce);
  SWIG_Php_ce__p_std__string->create_object = swig_ptr_object_new;
  zend_do_implement_interface(SWIG_Php_ce__p_std__string, &SWIG_Php_swig_wrapped_interface_ce);
  SWIG_TypeClientData(SWIGTYPE_p_std__string,SWIG_Php_ce__p_std__string);

  /* end oinit subsection */

  /* cinit subsection */
SWIG_LONG_CONSTANT(BAD_VALUENO, (Xapian::valueno)(Xapian::BAD_VALUENO));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "BAD_VALUENO", sizeof("BAD_VALUENO") - 1, (Xapian::valueno)(Xapian::BAD_VALUENO));

SWIG_LONG_CONSTANT(DB_CREATE, (int)(Xapian::DB_CREATE));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_CREATE", sizeof("DB_CREATE") - 1, (int)(Xapian::DB_CREATE));

SWIG_LONG_CONSTANT(DB_CREATE_OR_OPEN, (int)(Xapian::DB_CREATE_OR_OPEN));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_CREATE_OR_OPEN", sizeof("DB_CREATE_OR_OPEN") - 1, (int)(Xapian::DB_CREATE_OR_OPEN));

SWIG_LONG_CONSTANT(DB_CREATE_OR_OVERWRITE, (int)(Xapian::DB_CREATE_OR_OVERWRITE));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_CREATE_OR_OVERWRITE", sizeof("DB_CREATE_OR_OVERWRITE") - 1, (int)(Xapian::DB_CREATE_OR_OVERWRITE));

SWIG_LONG_CONSTANT(DB_OPEN, (int)(Xapian::DB_OPEN));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_OPEN", sizeof("DB_OPEN") - 1, (int)(Xapian::DB_OPEN));

SWIG_LONG_CONSTANT(DB_NO_SYNC, (int)(Xapian::DB_NO_SYNC));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_NO_SYNC", sizeof("DB_NO_SYNC") - 1, (int)(Xapian::DB_NO_SYNC));

SWIG_LONG_CONSTANT(DB_FULL_SYNC, (int)(Xapian::DB_FULL_SYNC));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_FULL_SYNC", sizeof("DB_FULL_SYNC") - 1, (int)(Xapian::DB_FULL_SYNC));

SWIG_LONG_CONSTANT(DB_DANGEROUS, (int)(Xapian::DB_DANGEROUS));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_DANGEROUS", sizeof("DB_DANGEROUS") - 1, (int)(Xapian::DB_DANGEROUS));

SWIG_LONG_CONSTANT(DB_NO_TERMLIST, (int)(Xapian::DB_NO_TERMLIST));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_NO_TERMLIST", sizeof("DB_NO_TERMLIST") - 1, (int)(Xapian::DB_NO_TERMLIST));

SWIG_LONG_CONSTANT(DB_BACKEND_CHERT, (int)(Xapian::DB_BACKEND_CHERT));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_BACKEND_CHERT", sizeof("DB_BACKEND_CHERT") - 1, (int)(Xapian::DB_BACKEND_CHERT));

SWIG_LONG_CONSTANT(DB_BACKEND_GLASS, (int)(Xapian::DB_BACKEND_GLASS));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_BACKEND_GLASS", sizeof("DB_BACKEND_GLASS") - 1, (int)(Xapian::DB_BACKEND_GLASS));

SWIG_LONG_CONSTANT(DB_BACKEND_INMEMORY, (int)(Xapian::DB_BACKEND_INMEMORY));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_BACKEND_INMEMORY", sizeof("DB_BACKEND_INMEMORY") - 1, (int)(Xapian::DB_BACKEND_INMEMORY));

SWIG_LONG_CONSTANT(DB_BACKEND_STUB, (int)(Xapian::DB_BACKEND_STUB));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_BACKEND_STUB", sizeof("DB_BACKEND_STUB") - 1, (int)(Xapian::DB_BACKEND_STUB));

SWIG_LONG_CONSTANT(DB_RETRY_LOCK, (int)(Xapian::DB_RETRY_LOCK));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DB_RETRY_LOCK", sizeof("DB_RETRY_LOCK") - 1, (int)(Xapian::DB_RETRY_LOCK));

SWIG_LONG_CONSTANT(DBCHECK_SHORT_TREE, (int)(Xapian::DBCHECK_SHORT_TREE));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DBCHECK_SHORT_TREE", sizeof("DBCHECK_SHORT_TREE") - 1, (int)(Xapian::DBCHECK_SHORT_TREE));

SWIG_LONG_CONSTANT(DBCHECK_FULL_TREE, (int)(Xapian::DBCHECK_FULL_TREE));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DBCHECK_FULL_TREE", sizeof("DBCHECK_FULL_TREE") - 1, (int)(Xapian::DBCHECK_FULL_TREE));

SWIG_LONG_CONSTANT(DBCHECK_SHOW_FREELIST, (int)(Xapian::DBCHECK_SHOW_FREELIST));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DBCHECK_SHOW_FREELIST", sizeof("DBCHECK_SHOW_FREELIST") - 1, (int)(Xapian::DBCHECK_SHOW_FREELIST));

SWIG_LONG_CONSTANT(DBCHECK_SHOW_STATS, (int)(Xapian::DBCHECK_SHOW_STATS));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DBCHECK_SHOW_STATS", sizeof("DBCHECK_SHOW_STATS") - 1, (int)(Xapian::DBCHECK_SHOW_STATS));

SWIG_LONG_CONSTANT(DBCHECK_FIX, (int)(Xapian::DBCHECK_FIX));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DBCHECK_FIX", sizeof("DBCHECK_FIX") - 1, (int)(Xapian::DBCHECK_FIX));

SWIG_LONG_CONSTANT(DBCOMPACT_MULTIPASS, (int)(Xapian::DBCOMPACT_MULTIPASS));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DBCOMPACT_MULTIPASS", sizeof("DBCOMPACT_MULTIPASS") - 1, (int)(Xapian::DBCOMPACT_MULTIPASS));

SWIG_LONG_CONSTANT(DBCOMPACT_NO_RENUMBER, (int)(Xapian::DBCOMPACT_NO_RENUMBER));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DBCOMPACT_NO_RENUMBER", sizeof("DBCOMPACT_NO_RENUMBER") - 1, (int)(Xapian::DBCOMPACT_NO_RENUMBER));

SWIG_LONG_CONSTANT(DBCOMPACT_SINGLE_FILE, (int)(Xapian::DBCOMPACT_SINGLE_FILE));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DBCOMPACT_SINGLE_FILE", sizeof("DBCOMPACT_SINGLE_FILE") - 1, (int)(Xapian::DBCOMPACT_SINGLE_FILE));

SWIG_LONG_CONSTANT(DOC_ASSUME_VALID, (int)(Xapian::DOC_ASSUME_VALID));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "DOC_ASSUME_VALID", sizeof("DOC_ASSUME_VALID") - 1, (int)(Xapian::DOC_ASSUME_VALID));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_AND", sizeof("OP_AND") - 1, (int)(Xapian::Query::OP_AND));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_OR", sizeof("OP_OR") - 1, (int)(Xapian::Query::OP_OR));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_AND_NOT", sizeof("OP_AND_NOT") - 1, (int)(Xapian::Query::OP_AND_NOT));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_XOR", sizeof("OP_XOR") - 1, (int)(Xapian::Query::OP_XOR));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_AND_MAYBE", sizeof("OP_AND_MAYBE") - 1, (int)(Xapian::Query::OP_AND_MAYBE));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_FILTER", sizeof("OP_FILTER") - 1, (int)(Xapian::Query::OP_FILTER));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_NEAR", sizeof("OP_NEAR") - 1, (int)(Xapian::Query::OP_NEAR));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_PHRASE", sizeof("OP_PHRASE") - 1, (int)(Xapian::Query::OP_PHRASE));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_VALUE_RANGE", sizeof("OP_VALUE_RANGE") - 1, (int)(Xapian::Query::OP_VALUE_RANGE));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_SCALE_WEIGHT", sizeof("OP_SCALE_WEIGHT") - 1, (int)(Xapian::Query::OP_SCALE_WEIGHT));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_ELITE_SET", sizeof("OP_ELITE_SET") - 1, (int)(Xapian::Query::OP_ELITE_SET));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_VALUE_GE", sizeof("OP_VALUE_GE") - 1, (int)(Xapian::Query::OP_VALUE_GE));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_VALUE_LE", sizeof("OP_VALUE_LE") - 1, (int)(Xapian::Query::OP_VALUE_LE));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_SYNONYM", sizeof("OP_SYNONYM") - 1, (int)(Xapian::Query::OP_SYNONYM));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_MAX", sizeof("OP_MAX") - 1, (int)(Xapian::Query::OP_MAX));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_WILDCARD", sizeof("OP_WILDCARD") - 1, (int)(Xapian::Query::OP_WILDCARD));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "OP_INVALID", sizeof("OP_INVALID") - 1, (int)(Xapian::Query::OP_INVALID));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "WILDCARD_LIMIT_ERROR", sizeof("WILDCARD_LIMIT_ERROR") - 1, (int)(Xapian::Query::WILDCARD_LIMIT_ERROR));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "WILDCARD_LIMIT_FIRST", sizeof("WILDCARD_LIMIT_FIRST") - 1, (int)(Xapian::Query::WILDCARD_LIMIT_FIRST));


  zend_declare_class_constant_long(SWIG_Php_ce_Query, "WILDCARD_LIMIT_MOST_FREQUENT", sizeof("WILDCARD_LIMIT_MOST_FREQUENT") - 1, (int)(Xapian::Query::WILDCARD_LIMIT_MOST_FREQUENT));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "FLAG_SPELLING", sizeof("FLAG_SPELLING") - 1, (int)(Xapian::TermGenerator::FLAG_SPELLING));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "FLAG_NGRAMS", sizeof("FLAG_NGRAMS") - 1, (int)(Xapian::TermGenerator::FLAG_NGRAMS));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "FLAG_CJK_NGRAM", sizeof("FLAG_CJK_NGRAM") - 1, (int)(Xapian::TermGenerator::FLAG_CJK_NGRAM));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "STEM_NONE", sizeof("STEM_NONE") - 1, (int)(Xapian::TermGenerator::STEM_NONE));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "STEM_SOME", sizeof("STEM_SOME") - 1, (int)(Xapian::TermGenerator::STEM_SOME));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "STEM_ALL", sizeof("STEM_ALL") - 1, (int)(Xapian::TermGenerator::STEM_ALL));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "STEM_ALL_Z", sizeof("STEM_ALL_Z") - 1, (int)(Xapian::TermGenerator::STEM_ALL_Z));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "STEM_SOME_FULL_POS", sizeof("STEM_SOME_FULL_POS") - 1, (int)(Xapian::TermGenerator::STEM_SOME_FULL_POS));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "STOP_NONE", sizeof("STOP_NONE") - 1, (int)(Xapian::TermGenerator::STOP_NONE));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "STOP_ALL", sizeof("STOP_ALL") - 1, (int)(Xapian::TermGenerator::STOP_ALL));


  zend_declare_class_constant_long(SWIG_Php_ce_TermGenerator, "STOP_STEMMED", sizeof("STOP_STEMMED") - 1, (int)(Xapian::TermGenerator::STOP_STEMMED));


  zend_declare_class_constant_long(SWIG_Php_ce_MSet, "SNIPPET_BACKGROUND_MODEL", sizeof("SNIPPET_BACKGROUND_MODEL") - 1, (int)(Xapian::MSet::SNIPPET_BACKGROUND_MODEL));


  zend_declare_class_constant_long(SWIG_Php_ce_MSet, "SNIPPET_EXHAUSTIVE", sizeof("SNIPPET_EXHAUSTIVE") - 1, (int)(Xapian::MSet::SNIPPET_EXHAUSTIVE));


  zend_declare_class_constant_long(SWIG_Php_ce_MSet, "SNIPPET_EMPTY_WITHOUT_MATCH", sizeof("SNIPPET_EMPTY_WITHOUT_MATCH") - 1, (int)(Xapian::MSet::SNIPPET_EMPTY_WITHOUT_MATCH));


  zend_declare_class_constant_long(SWIG_Php_ce_MSet, "SNIPPET_NGRAMS", sizeof("SNIPPET_NGRAMS") - 1, (int)(Xapian::MSet::SNIPPET_NGRAMS));


  zend_declare_class_constant_long(SWIG_Php_ce_MSet, "SNIPPET_CJK_NGRAM", sizeof("SNIPPET_CJK_NGRAM") - 1, (int)(Xapian::MSet::SNIPPET_CJK_NGRAM));


  zend_declare_class_constant_long(SWIG_Php_ce_Enquire, "ASCENDING", sizeof("ASCENDING") - 1, (int)(Xapian::Enquire::ASCENDING));


  zend_declare_class_constant_long(SWIG_Php_ce_Enquire, "DESCENDING", sizeof("DESCENDING") - 1, (int)(Xapian::Enquire::DESCENDING));


  zend_declare_class_constant_long(SWIG_Php_ce_Enquire, "DONT_CARE", sizeof("DONT_CARE") - 1, (int)(Xapian::Enquire::DONT_CARE));


  zend_declare_class_constant_long(SWIG_Php_ce_Enquire, "INCLUDE_QUERY_TERMS", sizeof("INCLUDE_QUERY_TERMS") - 1, (int)(Xapian::Enquire::INCLUDE_QUERY_TERMS));


  zend_declare_class_constant_long(SWIG_Php_ce_Enquire, "USE_EXACT_TERMFREQ", sizeof("USE_EXACT_TERMFREQ") - 1, (int)(Xapian::Enquire::USE_EXACT_TERMFREQ));

SWIG_LONG_CONSTANT(RP_SUFFIX, (int)(Xapian::RP_SUFFIX));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "RP_SUFFIX", sizeof("RP_SUFFIX") - 1, (int)(Xapian::RP_SUFFIX));

SWIG_LONG_CONSTANT(RP_REPEATED, (int)(Xapian::RP_REPEATED));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "RP_REPEATED", sizeof("RP_REPEATED") - 1, (int)(Xapian::RP_REPEATED));

SWIG_LONG_CONSTANT(RP_DATE_PREFER_MDY, (int)(Xapian::RP_DATE_PREFER_MDY));

  zend_declare_class_constant_long(SWIG_Php_ce_Xapian, "RP_DATE_PREFER_MDY", sizeof("RP_DATE_PREFER_MDY") - 1, (int)(Xapian::RP_DATE_PREFER_MDY));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_BOOLEAN", sizeof("FLAG_BOOLEAN") - 1, (int)(Xapian::QueryParser::FLAG_BOOLEAN));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_PHRASE", sizeof("FLAG_PHRASE") - 1, (int)(Xapian::QueryParser::FLAG_PHRASE));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_LOVEHATE", sizeof("FLAG_LOVEHATE") - 1, (int)(Xapian::QueryParser::FLAG_LOVEHATE));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_BOOLEAN_ANY_CASE", sizeof("FLAG_BOOLEAN_ANY_CASE") - 1, (int)(Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_WILDCARD", sizeof("FLAG_WILDCARD") - 1, (int)(Xapian::QueryParser::FLAG_WILDCARD));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_PURE_NOT", sizeof("FLAG_PURE_NOT") - 1, (int)(Xapian::QueryParser::FLAG_PURE_NOT));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_PARTIAL", sizeof("FLAG_PARTIAL") - 1, (int)(Xapian::QueryParser::FLAG_PARTIAL));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_SPELLING_CORRECTION", sizeof("FLAG_SPELLING_CORRECTION") - 1, (int)(Xapian::QueryParser::FLAG_SPELLING_CORRECTION));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_SYNONYM", sizeof("FLAG_SYNONYM") - 1, (int)(Xapian::QueryParser::FLAG_SYNONYM));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_AUTO_SYNONYMS", sizeof("FLAG_AUTO_SYNONYMS") - 1, (int)(Xapian::QueryParser::FLAG_AUTO_SYNONYMS));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_AUTO_MULTIWORD_SYNONYMS", sizeof("FLAG_AUTO_MULTIWORD_SYNONYMS") - 1, (int)(Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_NGRAMS", sizeof("FLAG_NGRAMS") - 1, (int)(Xapian::QueryParser::FLAG_NGRAMS));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_CJK_NGRAM", sizeof("FLAG_CJK_NGRAM") - 1, (int)(Xapian::QueryParser::FLAG_CJK_NGRAM));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_ACCUMULATE", sizeof("FLAG_ACCUMULATE") - 1, (int)(Xapian::QueryParser::FLAG_ACCUMULATE));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_NO_POSITIONS", sizeof("FLAG_NO_POSITIONS") - 1, (int)(Xapian::QueryParser::FLAG_NO_POSITIONS));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "FLAG_DEFAULT", sizeof("FLAG_DEFAULT") - 1, (int)(Xapian::QueryParser::FLAG_DEFAULT));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "STEM_NONE", sizeof("STEM_NONE") - 1, (int)(Xapian::QueryParser::STEM_NONE));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "STEM_SOME", sizeof("STEM_SOME") - 1, (int)(Xapian::QueryParser::STEM_SOME));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "STEM_ALL", sizeof("STEM_ALL") - 1, (int)(Xapian::QueryParser::STEM_ALL));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "STEM_ALL_Z", sizeof("STEM_ALL_Z") - 1, (int)(Xapian::QueryParser::STEM_ALL_Z));


  zend_declare_class_constant_long(SWIG_Php_ce_QueryParser, "STEM_SOME_FULL_POS", sizeof("STEM_SOME_FULL_POS") - 1, (int)(Xapian::QueryParser::STEM_SOME_FULL_POS));


  zend_declare_class_constant_long(SWIG_Php_ce_Weight, "TWO_STAGE_SMOOTHING", sizeof("TWO_STAGE_SMOOTHING") - 1, (int)(Xapian::Weight::TWO_STAGE_SMOOTHING));


  zend_declare_class_constant_long(SWIG_Php_ce_Weight, "DIRICHLET_SMOOTHING", sizeof("DIRICHLET_SMOOTHING") - 1, (int)(Xapian::Weight::DIRICHLET_SMOOTHING));


  zend_declare_class_constant_long(SWIG_Php_ce_Weight, "ABSOLUTE_DISCOUNT_SMOOTHING", sizeof("ABSOLUTE_DISCOUNT_SMOOTHING") - 1, (int)(Xapian::Weight::ABSOLUTE_DISCOUNT_SMOOTHING));


  zend_declare_class_constant_long(SWIG_Php_ce_Weight, "JELINEK_MERCER_SMOOTHING", sizeof("JELINEK_MERCER_SMOOTHING") - 1, (int)(Xapian::Weight::JELINEK_MERCER_SMOOTHING));


  zend_declare_class_constant_long(SWIG_Php_ce_Weight, "DIRICHLET_PLUS_SMOOTHING", sizeof("DIRICHLET_PLUS_SMOOTHING") - 1, (int)(Xapian::Weight::DIRICHLET_PLUS_SMOOTHING));


  zend_declare_class_constant_long(SWIG_Php_ce_Compactor, "STANDARD", sizeof("STANDARD") - 1, (int)(Xapian::Compactor::STANDARD));


  zend_declare_class_constant_long(SWIG_Php_ce_Compactor, "FULL", sizeof("FULL") - 1, (int)(Xapian::Compactor::FULL));


  zend_declare_class_constant_long(SWIG_Php_ce_Compactor, "FULLER", sizeof("FULLER") - 1, (int)(Xapian::Compactor::FULLER));

  /* end cinit subsection */

  return SUCCESS;
}

PHP_RINIT_FUNCTION(xapian)
{
/* rinit section */
#ifndef SWIG_PHP_INTERFACE_Iterator_CE
  {
    zend_class_entry *swig_interface_ce = zend_lookup_class(zend_string_init("Iterator", sizeof("Iterator") - 1, 0));
    if (swig_interface_ce)
      zend_do_implement_interface(SWIG_Php_ce_ESetIterator, swig_interface_ce);
    else
      zend_throw_exception(zend_ce_error, "Interface \"Iterator\" not found", 0);
  }
#endif
#ifndef SWIG_PHP_INTERFACE_Iterator_CE
  {
    zend_class_entry *swig_interface_ce = zend_lookup_class(zend_string_init("Iterator", sizeof("Iterator") - 1, 0));
    if (swig_interface_ce)
      zend_do_implement_interface(SWIG_Php_ce_MSetIterator, swig_interface_ce);
    else
      zend_throw_exception(zend_ce_error, "Interface \"Iterator\" not found", 0);
  }
#endif
#ifndef SWIG_PHP_INTERFACE_Iterator_CE
  {
    zend_class_entry *swig_interface_ce = zend_lookup_class(zend_string_init("Iterator", sizeof("Iterator") - 1, 0));
    if (swig_interface_ce)
      zend_do_implement_interface(SWIG_Php_ce_ValueIterator, swig_interface_ce);
    else
      zend_throw_exception(zend_ce_error, "Interface \"Iterator\" not found", 0);
  }
#endif
#ifndef SWIG_PHP_INTERFACE_Iterator_CE
  {
    zend_class_entry *swig_interface_ce = zend_lookup_class(zend_string_init("Iterator", sizeof("Iterator") - 1, 0));
    if (swig_interface_ce)
      zend_do_implement_interface(SWIG_Php_ce_TermIterator, swig_interface_ce);
    else
      zend_throw_exception(zend_ce_error, "Interface \"Iterator\" not found", 0);
  }
#endif
#ifndef SWIG_PHP_INTERFACE_Iterator_CE
  {
    zend_class_entry *swig_interface_ce = zend_lookup_class(zend_string_init("Iterator", sizeof("Iterator") - 1, 0));
    if (swig_interface_ce)
      zend_do_implement_interface(SWIG_Php_ce_PostingIterator, swig_interface_ce);
    else
      zend_throw_exception(zend_ce_error, "Interface \"Iterator\" not found", 0);
  }
#endif
#ifndef SWIG_PHP_INTERFACE_Iterator_CE
  {
    zend_class_entry *swig_interface_ce = zend_lookup_class(zend_string_init("Iterator", sizeof("Iterator") - 1, 0));
    if (swig_interface_ce)
      zend_do_implement_interface(SWIG_Php_ce_PositionIterator, swig_interface_ce);
    else
      zend_throw_exception(zend_ce_error, "Interface \"Iterator\" not found", 0);
  }
#endif

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