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

#define SWIGPYTHON
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE

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

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

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

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

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

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

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

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

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

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

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

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

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



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

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

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

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

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

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

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

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

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


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

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

   Now you can be more explicit:

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

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

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

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

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

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

       int food(double)
       int fooi(int);

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

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

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

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

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


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

#ifdef __cplusplus
}
#endif

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



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

#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
#define PyInt_Check(x) PyLong_Check(x)
#define PyInt_AsLong(x) PyLong_AsLong(x)
#define PyInt_FromLong(x) PyLong_FromLong(x)
#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)

#endif

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

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

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


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

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


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

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

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

#ifndef SWIG_PYBUFFER_SIZE
# define SWIG_PYBUFFER_SIZE 1024
#endif

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

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

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

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

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

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

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

/* Py_ssize_t for old Pythons */
/* This code is as recommended by: */
/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
#endif

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

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


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

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

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

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

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

#ifdef __cplusplus
extern "C" {
#if 0
} /* cc-mode */
#endif
#endif

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

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

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


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

#ifdef __cplusplus
#if 0
{ /* cc-mode */
#endif
}
#endif


/* -----------------------------------------------------------------------------
 * See the LICENSE file for information on copyright, usage and redistribution
 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
 *
 * pyrun.swg
 *
 * This file contains the runtime support for Python modules
 * and includes code for managing global variables and pointer
 * type checking.
 *
 * ----------------------------------------------------------------------------- */

/* Common SWIG API */

/* for raw pointers */
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
#define swig_owntype                                    int

/* for raw packed data */
#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)

/* for class or struct pointers */
#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)

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

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


/* Runtime API */

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

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


/* Runtime API implementation */

/* Error manipulation */

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

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

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

/* Set a constant value */

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

/* Append a value to the result obj */

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

/* Unpack the argument tuple */

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

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

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

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

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

#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)

#ifdef __cplusplus
extern "C" {
#if 0
} /* cc-mode */
#endif
#endif

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

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

/* The python void return value */

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

/* SwigPyClientData */

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

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

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


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

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

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

typedef struct {
  PyObject_HEAD
  void *ptr;
  swig_type_info *ty;
  int own;
  PyObject *next;
} SwigPyObject;

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

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

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

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

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

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

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

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

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


SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);

SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
  return type;
}

SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject *op) {
  return (Py_TYPE(op) == SwigPyObject_type())
    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);

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

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

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

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

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

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

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

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

SWIGRUNTIME PyObject *
SWIG_This(void)
{
  static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
  return swig_this;
}

/* #define SWIG_PYTHON_SLOW_GETSET_THIS */

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

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

/* Acquire a pointer value */

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

/* Convert a pointer value */

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

/* Convert a function ptr value */

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

/* Convert a packed value value */

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

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

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

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

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


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

/* Create a new pointer object */

SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
  if (!ptr) {
    return SWIG_Py_Void();
  } else {
    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    PyObject *robj = SwigPyObject_New(ptr, type, own);
    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
      if (inst) {
	Py_DECREF(robj);
	robj = inst;
      }
    }
    return robj;
  }
}

/* Create a new packed object */

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

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

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

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

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

SWIGRUNTIME void
SWIG_Python_DestroyModule(void *vptr)
{
  swig_module_info *swig_module = (swig_module_info *) vptr;
  swig_type_info **types = swig_module->types;
  size_t i;
  for (i =0; i < swig_module->size; ++i) {
    swig_type_info *ty = types[i];
    if (ty->owndata) {
      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
      if (data) SwigPyClientData_Del(data);
    }
  }
  Py_DECREF(SWIG_This());
}

SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) {
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */

#if PY_VERSION_HEX >= 0x03000000
 /* Add a dummy module object into sys.modules */
  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
#else
  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
				   swig_empty_runtime_method_table);
#endif
  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
  if (pointer && module) {
    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
  } else {
    Py_XDECREF(pointer);
  }
}

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

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

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

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

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

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


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


#ifdef __cplusplus
#if 0
{ /* cc-mode */
#endif
}
#endif



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

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



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


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

#define SWIGTYPE_p_capreq swig_types[0]
#define SWIGTYPE_p_char swig_types[1]
#define SWIGTYPE_p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_struct_trurl_array_private__p_tn_tuple swig_types[2]
#define SWIGTYPE_p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_tn_array__p_pkguinf swig_types[3]
#define SWIGTYPE_p_f_p_tn_alloc_p_void__void swig_types[4]
#define SWIGTYPE_p_f_p_void__void swig_types[5]
#define SWIGTYPE_p_f_p_void_p_void__void swig_types[6]
#define SWIGTYPE_p_int swig_types[7]
#define SWIGTYPE_p_long_long swig_types[8]
#define SWIGTYPE_p_p_char swig_types[9]
#define SWIGTYPE_p_p_flfile swig_types[10]
#define SWIGTYPE_p_p_trurl_array_private swig_types[11]
#define SWIGTYPE_p_p_void swig_types[12]
#define SWIGTYPE_p_pkg swig_types[13]
#define SWIGTYPE_p_pkgdir swig_types[14]
#define SWIGTYPE_p_pkgdir_dirindex swig_types[15]
#define SWIGTYPE_p_pkgdir_module swig_types[16]
#define SWIGTYPE_p_pkgdir_type_uinf swig_types[17]
#define SWIGTYPE_p_pkgflist swig_types[18]
#define SWIGTYPE_p_pkgflist_it swig_types[19]
#define SWIGTYPE_p_pkgroup_idx swig_types[20]
#define SWIGTYPE_p_pkguinf swig_types[21]
#define SWIGTYPE_p_pm_ctx swig_types[22]
#define SWIGTYPE_p_poclidek_ctx swig_types[23]
#define SWIGTYPE_p_poclidek_rcmd swig_types[24]
#define SWIGTYPE_p_poldek_ctx swig_types[25]
#define SWIGTYPE_p_poldek_ts swig_types[26]
#define SWIGTYPE_p_short swig_types[27]
#define SWIGTYPE_p_signed_char swig_types[28]
#define SWIGTYPE_p_source swig_types[29]
#define SWIGTYPE_p_t_fn_cmp swig_types[30]
#define SWIGTYPE_p_t_fn_dup swig_types[31]
#define SWIGTYPE_p_t_fn_free swig_types[32]
#define SWIGTYPE_p_time_t swig_types[33]
#define SWIGTYPE_p_tn_alloc swig_types[34]
#define SWIGTYPE_p_tn_buf swig_types[35]
#define SWIGTYPE_p_tn_fn_cmp swig_types[36]
#define SWIGTYPE_p_tn_fn_dup swig_types[37]
#define SWIGTYPE_p_tn_fn_free swig_types[38]
#define SWIGTYPE_p_tn_hash swig_types[39]
#define SWIGTYPE_p_tn_tuple swig_types[40]
#define SWIGTYPE_p_trurl_array_private swig_types[41]
#define SWIGTYPE_p_unsigned_char swig_types[42]
#define SWIGTYPE_p_unsigned_int swig_types[43]
#define SWIGTYPE_p_unsigned_long_long swig_types[44]
#define SWIGTYPE_p_unsigned_short swig_types[45]
#define SWIGTYPE_p_void swig_types[46]
static swig_type_info *swig_types[48];
static swig_module_info swig_module = {swig_types, 47, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

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

#if (PY_VERSION_HEX <= 0x02000000)
# if !defined(SWIG_PYTHON_CLASSIC)
#  error "This python version requires swig to be run with the '-classic' option"
# endif
#endif

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

#else
#  define SWIG_init    init_poldekmod

#endif
#define SWIG_name    "_poldekmod"

#define SWIGVERSION 0x010340 
#define SWIG_VERSION SWIGVERSION


#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 


#include "local_stdint.h"
#include "poldek.h"
#include "trurl/narray.h"
#include "trurl/nhash.h"
#include "capreq.h"    
#include "pkg.h"
#include "pkgu.h"
#include "poldek.h"
#include "poldek_ts.h"
#include "pkgdir/source.h"
#include "pkgdir/pkgdir.h"
#include "cli/poclidek.h"
#include "log.h"
#include "vfile/vfile.h" /* for vf_progress */

static void PythonDoLog(void *data, int pri, const char *message);
static int PythonConfirm(void *data, const struct poldek_ts *ts, 
                         int hint, const char *message);
static int PythonTsConfirm(void *data, const struct poldek_ts *ts);

static int PythonChooseEquiv(void *data, const struct poldek_ts *ts,
                             const struct pkg *pkg, const char *cap,
                             tn_array *pkgs, int hint);

static int PythonChooseSuggests(void *data, const struct poldek_ts *ts, 
                                const struct pkg *pkg, tn_array *caps, 
                                tn_array *choices, int hint);

static struct vf_progress vfPyProgress;


  #define SWIG_From_long   PyInt_FromLong 


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


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


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


#include <float.h>


#include <math.h>


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


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


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

SWIGINTERN tn_array *new_tn_array__SWIG_0(int size){ return n_array_new_ex(size, NULL, NULL, NULL); }
SWIGINTERN tn_array *new_tn_array__SWIG_1(void *arr){ return n_ref(arr); }
SWIGINTERN void delete_tn_array(tn_array *self){ n_array_free(self); }
SWIGINTERN int tn_array___len__(tn_array *self){ return n_array_size(self); }
SWIGINTERN void *tn_array_nth(tn_array *self,int i){
        if (i < n_array_size(self))
            return n_array_nth(self, i);
        return NULL;
    }

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


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


SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
{
  static int init = 0;
  static swig_type_info* info = 0;
  if (!init) {
    info = SWIG_TypeQuery("_p_char");
    init = 1;
  }
  return info;
}


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

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





SWIGINTERN int
SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v > UCHAR_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = (unsigned char)(v);
    }
  }  
  return res;
}


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


SWIGINTERNINLINE PyObject *
SWIG_From_unsigned_SS_char  (unsigned char value)
{    
  return SWIG_From_unsigned_SS_long  (value);
}


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


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


SWIGINTERN int
SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
{ 
  char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
  int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
  if (SWIG_IsOK(res)) {
    if ((csize == size + 1) && cptr && !(cptr[csize-1])) --csize;
    if (csize <= size) {
      if (val) {
	if (csize) memcpy(val, cptr, csize*sizeof(char));
	if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
      }
      if (alloc == SWIG_NEWOBJ) {
	free((char*)cptr);
	res = SWIG_DelNewMask(res);
      }      
      return res;
    }
    if (alloc == SWIG_NEWOBJ) free((char*)cptr);
  }
  return SWIG_TypeError;
}

SWIGINTERN struct capreq *new_capreq__SWIG_0(void *ptr){ return ptr; }
SWIGINTERN struct capreq *new_capreq__SWIG_1(char const *name,int32_t epoch,char const *version,char const *release,int32_t relflags,int32_t flags){
            return capreq_new(NULL, name, epoch, version, release,
                              relflags, flags);
        }
SWIGINTERN struct capreq *new_capreq__SWIG_2(char const *name,char const *evr,int32_t relflags,int32_t flags){
            int len = strlen(evr);
            char *evr_ = alloca(len + 1);
            memcpy(evr_, evr, len + 1);
            return capreq_new_evr(NULL, name, evr_, relflags, flags);
        }
SWIGINTERN char const *capreq_get_name(struct capreq *self){ return (self)->name; }
SWIGINTERN int32_t capreq_get_epoch(struct capreq *self){ return      ((self)->cr_ep_ofs ? capreq_epoch_(self) : 0); }
SWIGINTERN char const *capreq_get_ver(struct capreq *self){ return (&(self)->_buff[(self)->cr_ver_ofs]); }
SWIGINTERN char const *capreq_get_rel(struct capreq *self){ return (&(self)->_buff[(self)->cr_rel_ofs]); }
SWIGINTERN int capreq_is_versioned(struct capreq *self){ return ((self)->cr_relflags & (((1 << 0) | (1 << 1) | (1 << 2)))); }
SWIGINTERN int capreq__is_cnfl(struct capreq *self){ return ((self)->cr_flags & (1 << 2)); }
SWIGINTERN int capreq__is_prereq(struct capreq *self){ return ((self)->cr_flags & (1 << 3)); }
SWIGINTERN int capreq__is_prereq_un(struct capreq *self){ return ((self)->cr_flags & (1 << 4)); }
SWIGINTERN int capreq__is_file(struct capreq *self){ return (*(self)->name == '/'); }
SWIGINTERN int capreq__is_bastard(struct capreq *self){ return ((self)->cr_flags & (1 << 7)); }
SWIGINTERN int capreq__is_autodirreq(struct capreq *self){ return (((self)->cr_flags & (1 << 7)) && (*(self)->name == '/')); }
SWIGINTERN int capreq__is_obsl(struct capreq *self){ return (((self))->cr_flags & (1 << 3)); }
SWIGINTERN int capreq__is_rpmlib(struct capreq *self){ return ((self)->cr_flags & (1 << 5)); }
SWIGINTERN void delete_capreq(struct capreq *self){ capreq_free(self); }

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


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


SWIGINTERN int
SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v > USHRT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = (unsigned short)(v);
    }
  }  
  return res;
}


SWIGINTERNINLINE PyObject *
SWIG_From_unsigned_SS_short  (unsigned short value)
{    
  return SWIG_From_unsigned_SS_long  (value);
}


SWIGINTERN int
SWIG_AsVal_short (PyObject * obj, short *val)
{
  long v;
  int res = SWIG_AsVal_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v < SHRT_MIN || v > SHRT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = (short)(v);
    }
  }  
  return res;
}


SWIGINTERNINLINE PyObject *
SWIG_From_short  (short value)
{    
  return SWIG_From_long  (value);
}

SWIGINTERN struct pkg *new_pkg(void *ptr){ return ptr; }
SWIGINTERN tn_array *pkg__get_provides(struct pkg *self){ return self->caps; }
SWIGINTERN tn_array *pkg__get_requires(struct pkg *self){ return self->reqs; }
SWIGINTERN tn_array *pkg__get_conflicts(struct pkg *self){ return self->cnfls; }
SWIGINTERN tn_array *pkg__get_suggests(struct pkg *self){ return self->sugs; }
SWIGINTERN void delete_pkg(struct pkg *self){ pkg_free(self); }

SWIGINTERNINLINE PyObject *
SWIG_From_char  (char c) 
{ 
  return SWIG_FromCharPtrAndSize(&c,1);
}

SWIGINTERN struct source *new_source__SWIG_0(char const *name,char const *type,char const *path,char const *pkg_prefix){
        return source_new(name, type, path, pkg_prefix);
    }
SWIGINTERN struct source *new_source__SWIG_1(char const *name){
        return source_new(name, NULL, NULL, NULL); }
SWIGINTERN struct source *new_source__SWIG_2(void *src){ return source_link(src); }
SWIGINTERN char *source___str__(struct source *self){ 
        char *id = NULL;
        if (self->flags & (1 << 10))
           id = self->name;
        else {  
           char path[PATH_MAX];
           vf_url_slim(path, sizeof(path), self->path, 0);
           id = path;
        }
        return n_strdup(id);
    }
SWIGINTERN int source_get_enabled(struct source *self){
        //printf("get_enabled %d\n", (self->flags & PKGSOURCE_NOAUTO) == 0);
        return (self->flags & (1 << 0)) == 0;
    }
SWIGINTERN void source_set_enabled(struct source *self,int v){
        if (v)
           self->flags &= ~(1 << 0);
        else
           self->flags |= (1 << 0);

        //printf("%s enabled=%d\n", self->name, (self->flags & PKGSOURCE_NOAUTO) == 0);
    }
SWIGINTERN void delete_source(struct source *self){ source_free(self); }
SWIGINTERN struct pkgdir *new_pkgdir__SWIG_0(struct source *src,unsigned int flags){
        return pkgdir_srcopen(src, flags);
    }
SWIGINTERN struct pkgdir *new_pkgdir__SWIG_1(void *pkgdir){ return pkgdir; }
SWIGINTERN tn_array *pkgdir_get_packages(struct pkgdir *self){ return self->pkgs; }
SWIGINTERN char *pkgdir___str__(struct pkgdir *self){ // TODO: move it to C codebase
        char *id = NULL;
        if (self->flags & (1 << 0))
           id = self->name;
        else {  
           char path[PATH_MAX], *p;
           p = self->idxpath;     
           if (p == NULL)
               p = self->path;   
           if (p) {
              vf_url_slim(path, sizeof(path), p, 0);
              p = path;  
           } else {
              p = "anon";
           }
       
           id = p;
        }
        return n_strdup(id);
    }
SWIGINTERN void delete_pkgdir(struct pkgdir *self){ pkgdir_free(self); }
SWIGINTERN struct poldek_ctx *new_poldek_ctx(){
         struct poldek_ctx *ctx = poldek_new(0);
         poldek_configure(ctx, 20, NULL);
         poldek_configure(ctx, 21, NULL);
         return ctx;
    }
SWIGINTERN void delete_poldek_ctx(struct poldek_ctx *self){ poldek_free(self); }
SWIGINTERN int poldek_ctx_load_config(struct poldek_ctx *self,char const *path){ poldek_load_config(self, path, 0, 0); }
SWIGINTERN int poldek_ctx_configure__SWIG_0(struct poldek_ctx *self,int param,void *val){
        if (param == 8)
            val = source_link(val);
        poldek_configure(self, param, val);
    }
SWIGINTERN int poldek_ctx_configure__SWIG_1(struct poldek_ctx *self,int param,unsigned int val){ poldek_configure(self, param, val); }
SWIGINTERN int poldek_ctx_configure__SWIG_2(struct poldek_ctx *self,int param,char *val){ poldek_configure(self, param, val); }
SWIGINTERN struct poldek_ts *poldek_ctx_ts_new__SWIG_0(struct poldek_ctx *self,unsigned int flags){ return poldek_ts_new(self, flags); }
SWIGINTERN struct poldek_ts *poldek_ctx_ts_new__SWIG_1(struct poldek_ctx *self){ return poldek_ts_new(self, 0); }
SWIGINTERN int poldek_ctx_set_verbose(struct poldek_ctx *self,int v){ return poldek_set_verbose(v); }
SWIGINTERN void poldek_ctx_set_callbacks(struct poldek_ctx *self,PyObject *obj){
        void *v = (void*)obj;
        poldek_log_set_appender("pyldek", v, NULL, 0, PythonDoLog);
        poldek_configure(self, 23, (void*)PythonConfirm, v);
        poldek_configure(self, 24, (void*)PythonTsConfirm, v);
        poldek_configure(self, 25, (void*)PythonChooseEquiv, v); 
        poldek_configure(self, 26, (void*)PythonChooseSuggests, v); 
        Py_INCREF(obj);
    }
SWIGINTERN void poldek_ctx_set_vfile_progress(struct poldek_ctx *self,PyObject *obj){
        struct vf_progress *progress;
        progress = n_malloc(sizeof(*progress));
        *progress = vfPyProgress;
        progress->data = obj;
        progress->free = free;
        poldek_configure(self, 27, progress);
        Py_INCREF(obj);
    }
SWIGINTERN struct poldek_ts *new_poldek_ts__SWIG_0(struct poldek_ctx *ctx,unsigned int flags){
        return poldek_ts_new(ctx, flags);
    }
SWIGINTERN struct poldek_ts *new_poldek_ts__SWIG_1(struct poldek_ts *ts){  return ts; }
SWIGINTERN void delete_poldek_ts(struct poldek_ts *self){  poldek_ts_free(self); }
SWIGINTERN struct pkguinf *new_pkguinf(void *ptr){ return ptr; }
SWIGINTERN void delete_pkguinf(struct pkguinf *self){ pkguinf_free(self); }
SWIGINTERN struct pkgflist_it *new_pkgflist_it__SWIG_0(){ return NULL; }
SWIGINTERN struct pkgflist_it *new_pkgflist_it__SWIG_1(struct pkgflist_it *ptr){ return ptr; }
SWIGINTERN PyObject *pkgflist_it_get_tuple(struct pkgflist_it *self){ 
        int32_t size;
        uint16_t mode;
        const char *bn, *path;
        PyObject *tuple = NULL;

        if ((path = pkgflist_it_get_rawargs(self, &size, &mode, &bn)) == NULL) {
             Py_INCREF(Py_None); 
             return Py_None;
        }
        
        tuple = PyTuple_New(3);
        PyTuple_SET_ITEM(tuple, 0, Py_BuildValue("s", path));
        PyTuple_SET_ITEM(tuple, 1, PyInt_FromLong(size));
        PyTuple_SET_ITEM(tuple, 2, PyInt_FromLong(mode));
        return tuple;
    }
SWIGINTERN struct poclidek_ctx *new_poclidek_ctx(struct poldek_ctx *ctx){
        return poclidek_new(ctx);
    }
SWIGINTERN char *poclidek_ctx_pwd(struct poclidek_ctx *self){ 
        char path[1024]; 
        if (poclidek_pwd(self, path, sizeof(path)))
            return n_strdup(path);
        return NULL;
    }
SWIGINTERN int poclidek_ctx_chdir(struct poclidek_ctx *self,char const *dir){ 
        return poclidek_chdir(self, dir);
    }
SWIGINTERN void delete_poclidek_ctx(struct poclidek_ctx *self){ poclidek_free(self); }
SWIGINTERN struct poclidek_rcmd *new_poclidek_rcmd__SWIG_0(struct poclidek_ctx *cctx,struct poldek_ts *ts){
        return poclidek_rcmd_new(cctx, ts);
    }
SWIGINTERN struct poclidek_rcmd *new_poclidek_rcmd__SWIG_1(struct poclidek_ctx *cctx){
        return poclidek_rcmd_new(cctx, NULL);
    }
SWIGINTERN int poclidek_rcmd_execute(struct poclidek_rcmd *self,char const *cmdline){
        return poclidek_rcmd_execline(self, cmdline);
    }
SWIGINTERN char *poclidek_rcmd_to_s(struct poclidek_rcmd *self){
        const char *s = poclidek_rcmd_get_output(self);
        if (s) 
           return n_strdup(s);
        return NULL;
    }
SWIGINTERN void delete_poclidek_rcmd(struct poclidek_rcmd *self){ poclidek_rcmd_free(self); }

static void *py_progress_new(void *data, const char *label)
{
   PyObject *obj, *method, *pylabel, *r;
     
   obj = (PyObject *) data;                        
   method = Py_BuildValue("s", "initialize");
   pylabel = Py_BuildValue("s", label);
     
   r = PyObject_CallMethodObjArgs(obj, method, pylabel, NULL);
   if (r)
      Py_DECREF(r);

   Py_DECREF(method);
   Py_DECREF(pylabel);     
   return obj;
}

static void py_progress_reset(void *bar) {
   PyObject *obj, *method, *r;
     
   obj = (PyObject *) bar;                        
   method = Py_BuildValue("s", "reset");

   r = PyObject_CallMethodObjArgs(obj, method, NULL);
   if (r)
      Py_DECREF(r);

   Py_DECREF(method);
}

static void py_progress(void *bar, long total, long amount) {
   PyObject *obj, *method, *pytotal, *pyamount, *r;
     
   obj = (PyObject *) bar;                        
   method = Py_BuildValue("s", "progress");
   pytotal = Py_BuildValue("i", total);
   pyamount = Py_BuildValue("i", amount);

   r = PyObject_CallMethodObjArgs(obj, method, pytotal, pyamount, NULL);
   if (r)
      Py_DECREF(r);

   Py_DECREF(method);
   Py_DECREF(pytotal);
   Py_DECREF(pyamount);
}

static struct vf_progress vfPyProgress = {
    NULL, py_progress_new, py_progress, py_progress_reset, NULL
};

static void PythonDoLog(void *data, int pri, const char *message)
{
   PyObject *obj, *method, *pypri, *pymessage, *r;
   const char *spri = "info";

   if (pri & LOGERR)
       spri = "error";

   else if (pri & LOGWARN)
       spri = "warning";

   else if (pri & LOGNOTICE)
       spri = "notice";

   else if (pri & LOGOPT_CONT)
       spri = "cont";
     
   obj = (PyObject *) data;                        
   method = Py_BuildValue("s", "log");
   
   pypri = Py_BuildValue("s", spri);       
   pymessage = Py_BuildValue("s", message);

   r = PyObject_CallMethodObjArgs(obj, method, pypri, pymessage, NULL);
   if (r)
      Py_DECREF(r);
   Py_DECREF(method);
   Py_DECREF(pypri);
   Py_DECREF(pymessage);
}

static int PythonConfirm(void *data, const struct poldek_ts *ts, 
                         int hint, const char *message)
{
   PyObject *obj, *method, *pyts, *pyhint, *pymessage, *r; 
   int answer;
     
   obj = (PyObject *) data;
   method = Py_BuildValue("s", "confirm");

   pyts = SWIG_NewPointerObj(SWIG_as_voidptr(ts), SWIGTYPE_p_poldek_ts, 0 | 0);
   Py_INCREF(pyts);            // XXX - SWIG_NewPointerObj do incref?

   pyhint = Py_BuildValue("i", hint);     
   pymessage = Py_BuildValue("s", message);

   r = PyObject_CallMethodObjArgs(obj, method, pyts, pyhint, pymessage, NULL);

   Py_DECREF(method);
   Py_DECREF(pyts);
   Py_DECREF(pyhint);
   Py_DECREF(pymessage); 
     
   if (r == NULL)
      return hint;

   answer = PyObject_IsTrue(r);
   Py_DECREF(r);
   return answer;     
}

static int PythonTsConfirm(void *data, const struct poldek_ts *ts)
{
   PyObject *obj, *method, *pyts, *r; 
   int answer;
     
   obj = (PyObject *) data;
   method = Py_BuildValue("s", "confirm_transaction");
   pyts = SWIG_NewPointerObj(SWIG_as_voidptr(ts), SWIGTYPE_p_poldek_ts, 0 | 0);
   Py_INCREF(pyts); // XXX - SWIG_NewPointerObj do incref?     

   r = PyObject_CallMethodObjArgs(obj, method, pyts, NULL);
   Py_DECREF(pyts);
   Py_DECREF(method);
     
   if (r == NULL)
      return 0;

   answer = PyObject_IsTrue(r);
   Py_DECREF(r);
   return answer;     
}

static int PythonChooseEquiv(void *data, const struct poldek_ts *ts, 
                             const struct pkg *pkg, const char *cap, 
                             tn_array *pkgs, int hint)
{
   PyObject *obj, *method, *pyts, *pypkg, *pycap, *pypkgs, *pyhint, *r; 
   tn_array *packages = n_ref(pkgs);  // XXX
   int answer;
     
   obj = (PyObject *) data;
   method = Py_BuildValue("s", "raw__choose_equiv"); // XXX - see poldek.py

   pyts = SWIG_NewPointerObj(SWIG_as_voidptr(ts), SWIGTYPE_p_poldek_ts, 0 | 0);
   Py_INCREF(pyts);            // XXX - SWIG_NewPointerObj do incref?

   pypkg = SWIG_NewPointerObj(SWIG_as_voidptr(pkg), SWIGTYPE_p_pkg, 0 | 0);
   Py_INCREF(pypkg);            // XXX - SWIG_NewPointerObj do incref?

   pycap = Py_BuildValue("s", cap);     
   pypkgs = SWIG_NewPointerObj(SWIG_as_voidptr(pkgs), SWIGTYPE_p_trurl_array_private, 0 | 0);
   Py_INCREF(pypkgs);

   pyhint = Py_BuildValue("i", hint);     

   r = PyObject_CallMethodObjArgs(obj, method, pyts, pypkg, pycap, pypkgs, pyhint, NULL);

   Py_DECREF(method);
   Py_DECREF(pyts);
   Py_DECREF(pypkg);
   Py_DECREF(pycap);
   Py_DECREF(pypkgs);
   Py_DECREF(pyhint);
     
   if (r == NULL)
      return hint;

   answer = (int)PyLong_AsLong(r);
   Py_DECREF(r);
   return answer;     
}

static int PythonChooseSuggests(void *data, const struct poldek_ts *ts, 
                                const struct pkg *pkg, tn_array *caps, 
                                tn_array *choices, int hint)
{
   PyObject *obj, *method, *pyts, *pypkg, *pycaps, *pychoices, *pyhint, *r; 
   int answer;
     
   obj = (PyObject *) data;
   method = Py_BuildValue("s", "raw__choose_suggests"); // XXX - see poldek.py

   pyts = SWIG_NewPointerObj(SWIG_as_voidptr(ts), SWIGTYPE_p_poldek_ts, 0 | 0);
   Py_INCREF(pyts);            // XXX - SWIG_NewPointerObj do incref?

   pypkg = SWIG_NewPointerObj(SWIG_as_voidptr(pkg), SWIGTYPE_p_pkg, 0 | 0);
   Py_INCREF(pypkg);            // XXX - SWIG_NewPointerObj do incref?

   pycaps = SWIG_NewPointerObj(SWIG_as_voidptr(caps), SWIGTYPE_p_trurl_array_private, 0 | 0);
   Py_INCREF(pycaps);

   pychoices = SWIG_NewPointerObj(SWIG_as_voidptr(choices), SWIGTYPE_p_trurl_array_private, 0 | 0);
   Py_INCREF(pychoices);


   pyhint = Py_BuildValue("i", hint);     

   r = PyObject_CallMethodObjArgs(obj, method, pyts, pypkg, pycaps, pychoices, pyhint, NULL);

   Py_DECREF(method);
   Py_DECREF(pyts);
   Py_DECREF(pypkg);
   Py_DECREF(pycaps);
   Py_DECREF(pychoices);
   Py_DECREF(pyhint);
     
   if (r == NULL)
      return hint;

   answer = (int)PyLong_AsLong(r);
   Py_DECREF(r);
   return answer;     
}


#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN PyObject *_wrap_new_tn_array__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_tn_array",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_tn_array" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  result = (tn_array *)new_tn_array__SWIG_0(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_tn_array__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  int res1 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_tn_array",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_tn_array" "', argument " "1"" of type '" "void *""'"); 
  }
  result = (tn_array *)new_tn_array__SWIG_1(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_tn_array(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  int ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = (int)PyObject_Length(args);
  for (ii = 0; (ii < argc) && (ii < 1); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_tn_array__SWIG_1(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_tn_array__SWIG_0(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_tn_array'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    tn_array(int)\n"
    "    tn_array(void *)\n");
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_tn_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_tn_array",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_tn_array" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  delete_tn_array(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tn_array___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:tn_array___len__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tn_array___len__" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  result = (int)tn_array___len__(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tn_array_nth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:tn_array_nth",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tn_array_nth" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tn_array_nth" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  {
    result = (void *)tn_array_nth(arg1,arg2); 
    if (!result) {
      PyErr_SetString(PyExc_IndexError, "Index out of bounds"); 
      return NULL;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *tn_array_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_trurl_array_private, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_n_array_new_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  t_fn_free arg2 ;
  t_fn_cmp arg3 ;
  void **arg4 = (void **) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:n_array_new_ex",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "n_array_new_ex" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_t_fn_free,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_new_ex" "', argument " "2"" of type '" "t_fn_free""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_new_ex" "', argument " "2"" of type '" "t_fn_free""'");
    } else {
      arg2 = *((t_fn_free *)(argp2));
    }
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "n_array_new_ex" "', argument " "3"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_new_ex" "', argument " "3"" of type '" "t_fn_cmp""'");
    } else {
      arg3 = *((t_fn_cmp *)(argp3));
    }
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_void, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "n_array_new_ex" "', argument " "4"" of type '" "void **""'"); 
  }
  arg4 = (void **)(argp4);
  result = (tn_array *)n_array_new_ex(arg1,arg2,arg3,arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_new_na(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_alloc *arg1 = (tn_alloc *) 0 ;
  int arg2 ;
  t_fn_cmp arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:n_array_new_na",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tn_alloc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_new_na" "', argument " "1"" of type '" "tn_alloc *""'"); 
  }
  arg1 = (tn_alloc *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "n_array_new_na" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "n_array_new_na" "', argument " "3"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_new_na" "', argument " "3"" of type '" "t_fn_cmp""'");
    } else {
      arg3 = *((t_fn_cmp *)(argp3));
    }
  }
  result = (tn_array *)n_array_new_na(arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_init_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  int arg2 ;
  t_fn_free arg3 ;
  t_fn_cmp arg4 ;
  void **arg5 = (void **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOO:n_array_init_ex",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_init_ex" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "n_array_init_ex" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_t_fn_free,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "n_array_init_ex" "', argument " "3"" of type '" "t_fn_free""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_init_ex" "', argument " "3"" of type '" "t_fn_free""'");
    } else {
      arg3 = *((t_fn_free *)(argp3));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "n_array_init_ex" "', argument " "4"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_init_ex" "', argument " "4"" of type '" "t_fn_cmp""'");
    } else {
      arg4 = *((t_fn_cmp *)(argp4));
    }
  }
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_p_void, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "n_array_init_ex" "', argument " "5"" of type '" "void **""'"); 
  }
  arg5 = (void **)(argp5);
  result = (tn_array *)n_array_init_ex(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_ctl_set_freefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  tn_fn_free arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_fn_free result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_ctl_set_freefn",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_ctl_set_freefn" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tn_fn_free,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_ctl_set_freefn" "', argument " "2"" of type '" "tn_fn_free""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_ctl_set_freefn" "', argument " "2"" of type '" "tn_fn_free""'");
    } else {
      arg2 = *((tn_fn_free *)(argp2));
    }
  }
  result = n_array_ctl_set_freefn(arg1,arg2);
  resultobj = SWIG_NewPointerObj((tn_fn_free *)memcpy((tn_fn_free *)malloc(sizeof(tn_fn_free)),&result,sizeof(tn_fn_free)), SWIGTYPE_p_tn_fn_free, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_ctl_set_cmpfn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  tn_fn_cmp arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_fn_cmp result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_ctl_set_cmpfn",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_ctl_set_cmpfn" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tn_fn_cmp,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_ctl_set_cmpfn" "', argument " "2"" of type '" "tn_fn_cmp""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_ctl_set_cmpfn" "', argument " "2"" of type '" "tn_fn_cmp""'");
    } else {
      arg2 = *((tn_fn_cmp *)(argp2));
    }
  }
  result = n_array_ctl_set_cmpfn(arg1,arg2);
  resultobj = SWIG_NewPointerObj((tn_fn_cmp *)memcpy((tn_fn_cmp *)malloc(sizeof(tn_fn_cmp)),&result,sizeof(tn_fn_cmp)), SWIGTYPE_p_tn_fn_cmp, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_ctl_get_cmpfn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_fn_cmp result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:n_array_ctl_get_cmpfn",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_ctl_get_cmpfn" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  result = n_array_ctl_get_cmpfn((struct trurl_array_private const *)arg1);
  resultobj = SWIG_NewPointerObj((tn_fn_cmp *)memcpy((tn_fn_cmp *)malloc(sizeof(tn_fn_cmp)),&result,sizeof(tn_fn_cmp)), SWIGTYPE_p_tn_fn_cmp, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:n_array_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_free" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  n_array_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_cfree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array **arg1 = (tn_array **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:n_array_cfree",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_cfree" "', argument " "1"" of type '" "tn_array **""'"); 
  }
  arg1 = (tn_array **)(argp1);
  n_array_cfree(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_free_na(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_alloc *arg1 = (tn_alloc *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_free_na",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tn_alloc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_free_na" "', argument " "1"" of type '" "tn_alloc *""'"); 
  }
  arg1 = (tn_alloc *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_free_na" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  n_array_free_na(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_clean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:n_array_clean",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_clean" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  result = (tn_array *)n_array_clean(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_clone_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  t_fn_dup arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_clone_ex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_clone_ex" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_t_fn_dup,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_clone_ex" "', argument " "2"" of type '" "t_fn_dup""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_clone_ex" "', argument " "2"" of type '" "t_fn_dup""'");
    } else {
      arg2 = *((t_fn_dup *)(argp2));
    }
  }
  result = (tn_array *)n_array_clone_ex((struct trurl_array_private const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:n_array_clone",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_clone" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  result = (tn_array *)n_array_clone((struct trurl_array_private const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_dup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  t_fn_dup arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_dup",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_dup" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_t_fn_dup,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_dup" "', argument " "2"" of type '" "t_fn_dup""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_dup" "', argument " "2"" of type '" "t_fn_dup""'");
    } else {
      arg2 = *((t_fn_dup *)(argp2));
    }
  }
  result = (tn_array *)n_array_dup((struct trurl_array_private const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:n_array_size",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_size" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  result = (int)n_array_size((struct trurl_array_private const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_nth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_nth",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_nth" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "n_array_nth" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (void *)n_array_nth((struct trurl_array_private const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_set_nth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  int arg2 ;
  void *arg3 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:n_array_set_nth",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_set_nth" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "n_array_set_nth" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "n_array_set_nth" "', argument " "3"" of type '" "void *""'"); 
  }
  result = (tn_array *)n_array_set_nth(arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_remove_nth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_remove_nth",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_remove_nth" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "n_array_remove_nth" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (tn_array *)n_array_remove_nth(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_push(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_push",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_push" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_push" "', argument " "2"" of type '" "void *""'"); 
  }
  result = (tn_array *)n_array_push(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_concat_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  tn_fn_dup arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:n_array_concat_ex",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_concat_ex" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_concat_ex" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_tn_fn_dup,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "n_array_concat_ex" "', argument " "3"" of type '" "tn_fn_dup""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_concat_ex" "', argument " "3"" of type '" "tn_fn_dup""'");
    } else {
      arg3 = *((tn_fn_dup *)(argp3));
    }
  }
  result = (tn_array *)n_array_concat_ex(arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_grow_priv_(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_grow_priv_",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_grow_priv_" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "n_array_grow_priv_" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = (size_t)(val2);
  result = (tn_array *)n_array_grow_priv_(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:n_array_pop",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_pop" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  result = (void *)n_array_pop(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:n_array_shift",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_shift" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  result = (void *)n_array_shift(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_unshift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_unshift",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_unshift" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_unshift" "', argument " "2"" of type '" "void *""'"); 
  }
  result = (tn_array *)n_array_unshift(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_eq_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  t_fn_cmp arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:n_array_eq_ex",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_eq_ex" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_eq_ex" "', argument " "2"" of type '" "tn_array const *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "n_array_eq_ex" "', argument " "3"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_eq_ex" "', argument " "3"" of type '" "t_fn_cmp""'");
    } else {
      arg3 = *((t_fn_cmp *)(argp3));
    }
  }
  result = (int)n_array_eq_ex((struct trurl_array_private const *)arg1,(struct trurl_array_private const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_reverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:n_array_reverse",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_reverse" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  result = (tn_array *)n_array_reverse(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_uniq_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  t_fn_cmp arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_uniq_ex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_uniq_ex" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_uniq_ex" "', argument " "2"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_uniq_ex" "', argument " "2"" of type '" "t_fn_cmp""'");
    } else {
      arg2 = *((t_fn_cmp *)(argp2));
    }
  }
  result = (tn_array *)n_array_uniq_ex(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_sort_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  t_fn_cmp arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_sort_ex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_sort_ex" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_sort_ex" "', argument " "2"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_sort_ex" "', argument " "2"" of type '" "t_fn_cmp""'");
    } else {
      arg2 = *((t_fn_cmp *)(argp2));
    }
  }
  result = (tn_array *)n_array_sort_ex(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_qsort_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  t_fn_cmp arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_qsort_ex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_qsort_ex" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_qsort_ex" "', argument " "2"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_qsort_ex" "', argument " "2"" of type '" "t_fn_cmp""'");
    } else {
      arg2 = *((t_fn_cmp *)(argp2));
    }
  }
  result = (tn_array *)n_array_qsort_ex(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_isort_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  t_fn_cmp arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_isort_ex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_isort_ex" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_isort_ex" "', argument " "2"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_isort_ex" "', argument " "2"" of type '" "t_fn_cmp""'");
    } else {
      arg2 = *((t_fn_cmp *)(argp2));
    }
  }
  result = (tn_array *)n_array_isort_ex(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_bsearch_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *arg2 = (void *) 0 ;
  t_fn_cmp arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:n_array_bsearch_ex",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_bsearch_ex" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_bsearch_ex" "', argument " "2"" of type '" "void const *""'"); 
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "n_array_bsearch_ex" "', argument " "3"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_bsearch_ex" "', argument " "3"" of type '" "t_fn_cmp""'");
    } else {
      arg3 = *((t_fn_cmp *)(argp3));
    }
  }
  result = (void *)n_array_bsearch_ex((struct trurl_array_private const *)arg1,(void const *)arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_bsearch_idx_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *arg2 = (void *) 0 ;
  t_fn_cmp arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:n_array_bsearch_idx_ex",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_bsearch_idx_ex" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_bsearch_idx_ex" "', argument " "2"" of type '" "void const *""'"); 
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "n_array_bsearch_idx_ex" "', argument " "3"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_bsearch_idx_ex" "', argument " "3"" of type '" "t_fn_cmp""'");
    } else {
      arg3 = *((t_fn_cmp *)(argp3));
    }
  }
  result = (int)n_array_bsearch_idx_ex((struct trurl_array_private const *)arg1,(void const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_remove_ex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *arg2 = (void *) 0 ;
  t_fn_cmp arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:n_array_remove_ex",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_remove_ex" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_remove_ex" "', argument " "2"" of type '" "void const *""'"); 
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_t_fn_cmp,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "n_array_remove_ex" "', argument " "3"" of type '" "t_fn_cmp""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "n_array_remove_ex" "', argument " "3"" of type '" "t_fn_cmp""'");
    } else {
      arg3 = *((t_fn_cmp *)(argp3));
    }
  }
  result = (tn_array *)n_array_remove_ex(arg1,(void const *)arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void (*arg2)(void *) = (void (*)(void *)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_map",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_map" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "n_array_map" "', argument " "2"" of type '" "void (*)(void *)""'"); 
    }
  }
  n_array_map((struct trurl_array_private const *)arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_map_arg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void (*arg2)(void *,void *) = (void (*)(void *,void *)) 0 ;
  void *arg3 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:n_array_map_arg",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_map_arg" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void_p_void__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "n_array_map_arg" "', argument " "2"" of type '" "void (*)(void *,void *)""'"); 
    }
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "n_array_map_arg" "', argument " "3"" of type '" "void *""'"); 
  }
  n_array_map_arg((struct trurl_array_private const *)arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_n_array_dump_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:n_array_dump_stats",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "n_array_dump_stats" "', argument " "1"" of type '" "tn_array const *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "n_array_dump_stats" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  n_array_dump_stats((struct trurl_array_private const *)arg1,(char const *)arg2);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cr_flags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  uint8_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned char val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_cr_flags_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cr_flags_set" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "capreq_cr_flags_set" "', argument " "2"" of type '" "uint8_t""'");
  } 
  arg2 = (uint8_t)(val2);
  if (arg1) (arg1)->cr_flags = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cr_flags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint8_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_cr_flags_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cr_flags_get" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (uint8_t) ((arg1)->cr_flags);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cr_relflags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  uint8_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned char val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_cr_relflags_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cr_relflags_set" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "capreq_cr_relflags_set" "', argument " "2"" of type '" "uint8_t""'");
  } 
  arg2 = (uint8_t)(val2);
  if (arg1) (arg1)->cr_relflags = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cr_relflags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint8_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_cr_relflags_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cr_relflags_get" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (uint8_t) ((arg1)->cr_relflags);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_name_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_name_set" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "capreq_name_set" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  if (arg2) {
    size_t size = strlen((const char *)((const char *)(arg2))) + 1;
    arg1->name = (char const *)(char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size));
  } else {
    arg1->name = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_name_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_name_get" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (char *) ((arg1)->name);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cr_ep_ofs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  uint8_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned char val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_cr_ep_ofs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cr_ep_ofs_set" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "capreq_cr_ep_ofs_set" "', argument " "2"" of type '" "uint8_t""'");
  } 
  arg2 = (uint8_t)(val2);
  if (arg1) (arg1)->cr_ep_ofs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cr_ep_ofs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint8_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_cr_ep_ofs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cr_ep_ofs_get" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (uint8_t) ((arg1)->cr_ep_ofs);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cr_ver_ofs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  uint8_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned char val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_cr_ver_ofs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cr_ver_ofs_set" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "capreq_cr_ver_ofs_set" "', argument " "2"" of type '" "uint8_t""'");
  } 
  arg2 = (uint8_t)(val2);
  if (arg1) (arg1)->cr_ver_ofs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cr_ver_ofs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint8_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_cr_ver_ofs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cr_ver_ofs_get" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (uint8_t) ((arg1)->cr_ver_ofs);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cr_rel_ofs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  uint8_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned char val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_cr_rel_ofs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cr_rel_ofs_set" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "capreq_cr_rel_ofs_set" "', argument " "2"" of type '" "uint8_t""'");
  } 
  arg2 = (uint8_t)(val2);
  if (arg1) (arg1)->cr_rel_ofs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cr_rel_ofs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint8_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_cr_rel_ofs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cr_rel_ofs_get" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (uint8_t) ((arg1)->cr_rel_ofs);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq__buff_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[0] ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq__buff_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq__buff_set" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  res2 = SWIG_AsCharArray(obj1, temp2, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "capreq__buff_set" "', argument " "2"" of type '" "char [0]""'");
  }
  arg2 = (char *)(temp2);
  if (arg2) memcpy(arg1->_buff,arg2,0*sizeof(char));
  else memset(arg1->_buff,0,0*sizeof(char));
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq__buff_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq__buff_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq__buff_get" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (char *)(char *) ((arg1)->_buff);
  {
    size_t size = 0;
    
    while (size && (result[size - 1] == '\0')) --size;
    
    resultobj = SWIG_FromCharPtrAndSize(result, size);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_capreq__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  int res1 ;
  PyObject * obj0 = 0 ;
  struct capreq *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_capreq",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_capreq" "', argument " "1"" of type '" "void *""'"); 
  }
  result = (struct capreq *)new_capreq__SWIG_0(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_capreq, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_capreq__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int32_t arg2 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  int32_t arg5 ;
  int32_t arg6 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  struct capreq *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:new_capreq",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_capreq" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_capreq" "', argument " "2"" of type '" "int32_t""'");
  } 
  arg2 = (int32_t)(val2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_capreq" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_capreq" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_capreq" "', argument " "5"" of type '" "int32_t""'");
  } 
  arg5 = (int32_t)(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_capreq" "', argument " "6"" of type '" "int32_t""'");
  } 
  arg6 = (int32_t)(val6);
  result = (struct capreq *)new_capreq__SWIG_1((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4,arg5,arg6);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_capreq, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_capreq__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int32_t arg3 ;
  int32_t arg4 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  struct capreq *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_capreq",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_capreq" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_capreq" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_capreq" "', argument " "3"" of type '" "int32_t""'");
  } 
  arg3 = (int32_t)(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_capreq" "', argument " "4"" of type '" "int32_t""'");
  } 
  arg4 = (int32_t)(val4);
  result = (struct capreq *)new_capreq__SWIG_2((char const *)arg1,(char const *)arg2,arg3,arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_capreq, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_capreq(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[7];
  int ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = (int)PyObject_Length(args);
  for (ii = 0; (ii < argc) && (ii < 6); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_capreq__SWIG_0(self, args);
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_capreq__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_new_capreq__SWIG_1(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_capreq'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    capreq(void *)\n"
    "    capreq(char const *,int32_t,char const *,char const *,int32_t,int32_t)\n"
    "    capreq(char const *,char const *,int32_t,int32_t)\n");
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_get_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_get_name",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_get_name" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (char *)capreq_get_name(arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_get_epoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_get_epoch",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_get_epoch" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int32_t)capreq_get_epoch(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_get_ver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_get_ver",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_get_ver" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (char *)capreq_get_ver(arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_get_rel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_get_rel",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_get_rel" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (char *)capreq_get_rel(arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_is_versioned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_is_versioned",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_is_versioned" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int)capreq_is_versioned(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq__is_cnfl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq__is_cnfl",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq__is_cnfl" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int)capreq__is_cnfl(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq__is_prereq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq__is_prereq",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq__is_prereq" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int)capreq__is_prereq(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq__is_prereq_un(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq__is_prereq_un",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq__is_prereq_un" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int)capreq__is_prereq_un(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq__is_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq__is_file",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq__is_file" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int)capreq__is_file(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq__is_bastard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq__is_bastard",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq__is_bastard" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int)capreq__is_bastard(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq__is_autodirreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq__is_autodirreq",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq__is_autodirreq" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int)capreq__is_autodirreq(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq__is_obsl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq__is_obsl",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq__is_obsl" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int)capreq__is_obsl(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq__is_rpmlib(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq__is_rpmlib",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq__is_rpmlib" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int)capreq__is_rpmlib(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_capreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_capreq",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_capreq" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  delete_capreq(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *capreq_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_capreq, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_capreq_epoch_(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_epoch_",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_epoch_" "', argument " "1"" of type '" "struct capreq const *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (int32_t)capreq_epoch_((struct capreq const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_new_evr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_alloc *arg1 = (tn_alloc *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int32_t arg4 ;
  int32_t arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  struct capreq *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOO:capreq_new_evr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tn_alloc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_new_evr" "', argument " "1"" of type '" "tn_alloc *""'"); 
  }
  arg1 = (tn_alloc *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "capreq_new_evr" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "capreq_new_evr" "', argument " "3"" of type '" "char *""'");
  }
  arg3 = (char *)(buf3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "capreq_new_evr" "', argument " "4"" of type '" "int32_t""'");
  } 
  arg4 = (int32_t)(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "capreq_new_evr" "', argument " "5"" of type '" "int32_t""'");
  } 
  arg5 = (int32_t)(val5);
  result = (struct capreq *)capreq_new_evr(arg1,(char const *)arg2,arg3,arg4,arg5);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_capreq, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_alloc *arg1 = (tn_alloc *) 0 ;
  char *arg2 = (char *) 0 ;
  int32_t arg3 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  int32_t arg6 ;
  int32_t arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  struct capreq *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:capreq_new",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tn_alloc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_new" "', argument " "1"" of type '" "tn_alloc *""'"); 
  }
  arg1 = (tn_alloc *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "capreq_new" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "capreq_new" "', argument " "3"" of type '" "int32_t""'");
  } 
  arg3 = (int32_t)(val3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "capreq_new" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "capreq_new" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = (char *)(buf5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "capreq_new" "', argument " "6"" of type '" "int32_t""'");
  } 
  arg6 = (int32_t)(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "capreq_new" "', argument " "7"" of type '" "int32_t""'");
  } 
  arg7 = (int32_t)(val7);
  result = (struct capreq *)capreq_new(arg1,(char const *)arg2,arg3,(char const *)arg4,(char const *)arg5,arg6,arg7);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_capreq, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_free_na(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_alloc *arg1 = (tn_alloc *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_free_na",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tn_alloc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_free_na" "', argument " "1"" of type '" "tn_alloc *""'"); 
  }
  arg1 = (tn_alloc *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "capreq_free_na" "', argument " "2"" of type '" "struct capreq *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  capreq_free_na(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_free" "', argument " "1"" of type '" "struct capreq *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  capreq_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_alloc *arg1 = (tn_alloc *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct capreq *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_clone",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tn_alloc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_clone" "', argument " "1"" of type '" "tn_alloc *""'"); 
  }
  arg1 = (tn_alloc *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "capreq_clone" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  result = (struct capreq *)capreq_clone(arg1,(struct capreq const *)arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_capreq, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_strcmp_evr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_strcmp_evr",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_strcmp_evr" "', argument " "1"" of type '" "struct capreq const *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "capreq_strcmp_evr" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  result = (int)capreq_strcmp_evr((struct capreq const *)arg1,(struct capreq const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_strcmp_name_evr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_strcmp_name_evr",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_strcmp_name_evr" "', argument " "1"" of type '" "struct capreq const *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "capreq_strcmp_name_evr" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  result = (int)capreq_strcmp_name_evr((struct capreq const *)arg1,(struct capreq const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cmp_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_cmp_name",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cmp_name" "', argument " "1"" of type '" "struct capreq const *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "capreq_cmp_name" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  result = (int)capreq_cmp_name((struct capreq const *)arg1,(struct capreq const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_cmp_name_evr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:capreq_cmp_name_evr",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_cmp_name_evr" "', argument " "1"" of type '" "struct capreq const *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "capreq_cmp_name_evr" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  result = (int)capreq_cmp_name_evr((struct capreq const *)arg1,(struct capreq const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_snprintf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  size_t arg2 ;
  struct capreq *arg3 = (struct capreq *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:capreq_snprintf",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_snprintf" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "capreq_snprintf" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = (size_t)(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "capreq_snprintf" "', argument " "3"" of type '" "struct capreq const *""'"); 
  }
  arg3 = (struct capreq *)(argp3);
  result = (int)capreq_snprintf(arg1,arg2,(struct capreq const *)arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_snprintf_s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_snprintf_s",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_snprintf_s" "', argument " "1"" of type '" "struct capreq const *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (char *)capreq_snprintf_s((struct capreq const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_snprintf_s0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:capreq_snprintf_s0",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_snprintf_s0" "', argument " "1"" of type '" "struct capreq const *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  result = (char *)capreq_snprintf_s0((struct capreq const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_capreq_str(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  size_t arg2 ;
  struct capreq *arg3 = (struct capreq *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:capreq_str",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "capreq_str" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "capreq_str" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = (size_t)(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "capreq_str" "', argument " "3"" of type '" "struct capreq const *""'"); 
  }
  arg3 = (struct capreq *)(argp3);
  result = (char *)capreq_str(arg1,arg2,(struct capreq const *)arg3);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_flags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_flags_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_flags_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_flags_set" "', argument " "2"" of type '" "uint32_t""'");
  } 
  arg2 = (uint32_t)(val2);
  if (arg1) (arg1)->flags = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_flags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_flags_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_flags_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (uint32_t) ((arg1)->flags);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_size_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_size_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_size_set" "', argument " "2"" of type '" "uint32_t""'");
  } 
  arg2 = (uint32_t)(val2);
  if (arg1) (arg1)->size = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_size_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_size_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (uint32_t) ((arg1)->size);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_fsize_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_fsize_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_fsize_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_fsize_set" "', argument " "2"" of type '" "uint32_t""'");
  } 
  arg2 = (uint32_t)(val2);
  if (arg1) (arg1)->fsize = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_fsize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_fsize_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_fsize_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (uint32_t) ((arg1)->fsize);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_btime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_btime_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_btime_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_btime_set" "', argument " "2"" of type '" "uint32_t""'");
  } 
  arg2 = (uint32_t)(val2);
  if (arg1) (arg1)->btime = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_btime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_btime_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_btime_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (uint32_t) ((arg1)->btime);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_color_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_color_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_color_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_color_set" "', argument " "2"" of type '" "uint32_t""'");
  } 
  arg2 = (uint32_t)(val2);
  if (arg1) (arg1)->color = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_color_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_color_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_color_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (uint32_t) ((arg1)->color);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_name_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_name_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_name_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->name) free((char*)arg1->name);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->name = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_name_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_name_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *) ((arg1)->name);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_epoch_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  int32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_epoch_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_epoch_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_epoch_set" "', argument " "2"" of type '" "int32_t""'");
  } 
  arg2 = (int32_t)(val2);
  if (arg1) (arg1)->epoch = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_epoch_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_epoch_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_epoch_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (int32_t) ((arg1)->epoch);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_ver_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_ver_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_ver_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_ver_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->ver) free((char*)arg1->ver);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->ver = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->ver = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_ver_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_ver_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_ver_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *) ((arg1)->ver);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_rel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_rel_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_rel_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_rel_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->rel) free((char*)arg1->rel);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->rel = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->rel = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_rel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_rel_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_rel_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *) ((arg1)->rel);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_fn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_fn_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_fn_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_fn_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->fn) free((char*)arg1->fn);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->fn = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->fn = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_fn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_fn_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_fn_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *) ((arg1)->fn);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_srcfn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_srcfn_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_srcfn_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_srcfn_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->srcfn) free((char*)arg1->srcfn);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->srcfn = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->srcfn = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_srcfn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_srcfn_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_srcfn_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *) ((arg1)->srcfn);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_fmtime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_fmtime_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_fmtime_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_fmtime_set" "', argument " "2"" of type '" "uint32_t""'");
  } 
  arg2 = (uint32_t)(val2);
  if (arg1) (arg1)->fmtime = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_fmtime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_fmtime_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_fmtime_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (uint32_t) ((arg1)->fmtime);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__nvr_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg__nvr_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__nvr_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg__nvr_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->_nvr) free((char*)arg1->_nvr);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->_nvr = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->_nvr = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__nvr_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg__nvr_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__nvr_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *) ((arg1)->_nvr);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__arch_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  uint16_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned short val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg__arch_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__arch_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg__arch_set" "', argument " "2"" of type '" "uint16_t""'");
  } 
  arg2 = (uint16_t)(val2);
  if (arg1) (arg1)->_arch = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__arch_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint16_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg__arch_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__arch_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (uint16_t) ((arg1)->_arch);
  resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__os_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  uint16_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned short val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg__os_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__os_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg__os_set" "', argument " "2"" of type '" "uint16_t""'");
  } 
  arg2 = (uint16_t)(val2);
  if (arg1) (arg1)->_os = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__os_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint16_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg__os_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__os_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (uint16_t) ((arg1)->_os);
  resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_caps_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_caps_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_caps_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_caps_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->caps = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_caps_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_caps_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_caps_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *) ((arg1)->caps);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_reqs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_reqs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_reqs_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_reqs_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->reqs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_reqs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_reqs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_reqs_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *) ((arg1)->reqs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_cnfls_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_cnfls_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_cnfls_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_cnfls_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->cnfls = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_cnfls_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_cnfls_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_cnfls_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *) ((arg1)->cnfls);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_sugs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_sugs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_sugs_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_sugs_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->sugs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_sugs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_sugs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_sugs_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *) ((arg1)->sugs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_fl_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_tuple *arg2 = (tn_tuple *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_fl_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_fl_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_tn_tuple, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_fl_set" "', argument " "2"" of type '" "tn_tuple *""'"); 
  }
  arg2 = (tn_tuple *)(argp2);
  if (arg1) (arg1)->fl = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_fl_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_tuple *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_fl_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_fl_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_tuple *) ((arg1)->fl);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tn_tuple, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_reqpkgs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_reqpkgs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_reqpkgs_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_reqpkgs_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->reqpkgs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_reqpkgs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_reqpkgs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_reqpkgs_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *) ((arg1)->reqpkgs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_revreqpkgs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_revreqpkgs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_revreqpkgs_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_revreqpkgs_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->revreqpkgs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_revreqpkgs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_revreqpkgs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_revreqpkgs_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *) ((arg1)->revreqpkgs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_cnflpkgs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_cnflpkgs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_cnflpkgs_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_cnflpkgs_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->cnflpkgs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_cnflpkgs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_cnflpkgs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_cnflpkgs_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *) ((arg1)->cnflpkgs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pkgdir_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct pkgdir *arg2 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_pkgdir_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pkgdir_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkgdir, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_pkgdir_set" "', argument " "2"" of type '" "struct pkgdir *""'"); 
  }
  arg2 = (struct pkgdir *)(argp2);
  if (arg1) (arg1)->pkgdir = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pkgdir_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_pkgdir_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pkgdir_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (struct pkgdir *) ((arg1)->pkgdir);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pkgdir_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_pkgdir_data_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pkgdir_data_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_pkgdir_data_set" "', argument " "2"" of type '" "void *""'"); 
  }
  if (arg1) (arg1)->pkgdir_data = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pkgdir_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_pkgdir_data_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pkgdir_data_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (void *) ((arg1)->pkgdir_data);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pkgdir_data_free_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void (*arg2)(tn_alloc *,void *) = (void (*)(tn_alloc *,void *)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_pkgdir_data_free_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pkgdir_data_free_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_tn_alloc_p_void__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "pkg_pkgdir_data_free_set" "', argument " "2"" of type '" "void (*)(tn_alloc *,void *)""'"); 
    }
  }
  if (arg1) (arg1)->pkgdir_data_free = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pkgdir_data_free_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  void (*result)(tn_alloc *,void *) = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_pkgdir_data_free_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pkgdir_data_free_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (void (*)(tn_alloc *,void *)) ((arg1)->pkgdir_data_free);
  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_tn_alloc_p_void__void);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_load_pkguinf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct pkguinf *(*arg2)(tn_alloc *,struct pkg const *,void *,tn_array *) = (struct pkguinf *(*)(tn_alloc *,struct pkg const *,void *,tn_array *)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_load_pkguinf_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_load_pkguinf_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_tn_array__p_pkguinf);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "pkg_load_pkguinf_set" "', argument " "2"" of type '" "struct pkguinf *(*)(tn_alloc *,struct pkg const *,void *,tn_array *)""'"); 
    }
  }
  if (arg1) (arg1)->load_pkguinf = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_load_pkguinf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkguinf *(*result)(tn_alloc *,struct pkg const *,void *,tn_array *) = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_load_pkguinf_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_load_pkguinf_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (struct pkguinf *(*)(tn_alloc *,struct pkg const *,void *,tn_array *)) ((arg1)->load_pkguinf);
  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_tn_array__p_pkguinf);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_load_nodep_fl_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_tuple *(*arg2)(tn_alloc *,struct pkg const *,void *,tn_array *) = (tn_tuple *(*)(tn_alloc *,struct pkg const *,void *,tn_array *)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_load_nodep_fl_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_load_nodep_fl_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_struct_trurl_array_private__p_tn_tuple);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "pkg_load_nodep_fl_set" "', argument " "2"" of type '" "tn_tuple *(*)(tn_alloc *,struct pkg const *,void *,tn_array *)""'"); 
    }
  }
  if (arg1) (arg1)->load_nodep_fl = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_load_nodep_fl_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_tuple *(*result)(tn_alloc *,struct pkg const *,void *,tn_array *) = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_load_nodep_fl_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_load_nodep_fl_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_tuple *(*)(tn_alloc *,struct pkg const *,void *,tn_array *)) ((arg1)->load_nodep_fl);
  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_struct_trurl_array_private__p_tn_tuple);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pkg_pkguinf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct pkguinf *arg2 = (struct pkguinf *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_pkg_pkguinf_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pkg_pkguinf_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkguinf, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_pkg_pkguinf_set" "', argument " "2"" of type '" "struct pkguinf *""'"); 
  }
  arg2 = (struct pkguinf *)(argp2);
  if (arg1) (arg1)->pkg_pkguinf = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pkg_pkguinf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkguinf *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_pkg_pkguinf_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pkg_pkguinf_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (struct pkguinf *) ((arg1)->pkg_pkguinf);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkguinf, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pri_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_pri_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pri_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_pri_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->pri = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pri_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_pri_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pri_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (int) ((arg1)->pri);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_groupid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_groupid_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_groupid_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_groupid_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->groupid = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_groupid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_groupid_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_groupid_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (int) ((arg1)->groupid);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_recno_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  int32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_recno_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_recno_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_recno_set" "', argument " "2"" of type '" "int32_t""'");
  } 
  arg2 = (int32_t)(val2);
  if (arg1) (arg1)->recno = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_recno_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_recno_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_recno_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (int32_t) ((arg1)->recno);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_itime_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  int32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_itime_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_itime_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_itime_set" "', argument " "2"" of type '" "int32_t""'");
  } 
  arg2 = (int32_t)(val2);
  if (arg1) (arg1)->itime = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_itime_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_itime_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_itime_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (int32_t) ((arg1)->itime);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__refcnt_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  uint16_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned short val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg__refcnt_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__refcnt_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg__refcnt_set" "', argument " "2"" of type '" "uint16_t""'");
  } 
  arg2 = (uint16_t)(val2);
  if (arg1) (arg1)->_refcnt = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__refcnt_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  uint16_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg__refcnt_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__refcnt_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (uint16_t) ((arg1)->_refcnt);
  resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_na_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_alloc *arg2 = (tn_alloc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_na_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_na_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_tn_alloc, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_na_set" "', argument " "2"" of type '" "tn_alloc *""'"); 
  }
  arg2 = (tn_alloc *)(argp2);
  if (arg1) (arg1)->na = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_na_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_alloc *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_na_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_na_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_alloc *) ((arg1)->na);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tn_alloc, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__buf_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  int16_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  short val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg__buf_size_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__buf_size_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  ecode2 = SWIG_AsVal_short(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg__buf_size_set" "', argument " "2"" of type '" "int16_t""'");
  } 
  arg2 = (int16_t)(val2);
  if (arg1) (arg1)->_buf_size = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__buf_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int16_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg__buf_size_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__buf_size_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (int16_t) ((arg1)->_buf_size);
  resultobj = SWIG_From_short((short)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__buf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[0] ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg__buf_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__buf_set" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharArray(obj1, temp2, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg__buf_set" "', argument " "2"" of type '" "char [0]""'");
  }
  arg2 = (char *)(temp2);
  if (arg2) memcpy(arg1->_buf,arg2,0*sizeof(char));
  else memset(arg1->_buf,0,0*sizeof(char));
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__buf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg__buf_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__buf_get" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)(char *) ((arg1)->_buf);
  {
    size_t size = 0;
    
    while (size && (result[size - 1] == '\0')) --size;
    
    resultobj = SWIG_FromCharPtrAndSize(result, size);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_pkg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  int res1 ;
  PyObject * obj0 = 0 ;
  struct pkg *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_pkg",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_pkg" "', argument " "1"" of type '" "void *""'"); 
  }
  result = (struct pkg *)new_pkg(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkg, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__get_provides(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg__get_provides",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__get_provides" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *)pkg__get_provides(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__get_requires(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg__get_requires",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__get_requires" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *)pkg__get_requires(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__get_conflicts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg__get_conflicts",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__get_conflicts" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *)pkg__get_conflicts(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg__get_suggests(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg__get_suggests",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg__get_suggests" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *)pkg__get_suggests(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_pkg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_pkg",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pkg" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  delete_pkg(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *pkg_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_pkg, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_pkg_new_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_alloc *arg1 = (tn_alloc *) 0 ;
  char *arg2 = (char *) 0 ;
  int32_t arg3 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  char *arg6 = (char *) 0 ;
  char *arg7 = (char *) 0 ;
  char *arg8 = (char *) 0 ;
  char *arg9 = (char *) 0 ;
  uint32_t arg10 ;
  uint32_t arg11 ;
  uint32_t arg12 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  int res7 ;
  char *buf7 = 0 ;
  int alloc7 = 0 ;
  int res8 ;
  char *buf8 = 0 ;
  int alloc8 = 0 ;
  int res9 ;
  char *buf9 = 0 ;
  int alloc9 = 0 ;
  unsigned int val10 ;
  int ecode10 = 0 ;
  unsigned int val11 ;
  int ecode11 = 0 ;
  unsigned int val12 ;
  int ecode12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  struct pkg *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOO:pkg_new_ext",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tn_alloc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_new_ext" "', argument " "1"" of type '" "tn_alloc *""'"); 
  }
  arg1 = (tn_alloc *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_new_ext" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_new_ext" "', argument " "3"" of type '" "int32_t""'");
  } 
  arg3 = (int32_t)(val3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkg_new_ext" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pkg_new_ext" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = (char *)(buf5);
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pkg_new_ext" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = (char *)(buf6);
  res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "pkg_new_ext" "', argument " "7"" of type '" "char const *""'");
  }
  arg7 = (char *)(buf7);
  res8 = SWIG_AsCharPtrAndSize(obj7, &buf8, NULL, &alloc8);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "pkg_new_ext" "', argument " "8"" of type '" "char const *""'");
  }
  arg8 = (char *)(buf8);
  res9 = SWIG_AsCharPtrAndSize(obj8, &buf9, NULL, &alloc9);
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "pkg_new_ext" "', argument " "9"" of type '" "char const *""'");
  }
  arg9 = (char *)(buf9);
  ecode10 = SWIG_AsVal_unsigned_SS_int(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "pkg_new_ext" "', argument " "10"" of type '" "uint32_t""'");
  } 
  arg10 = (uint32_t)(val10);
  ecode11 = SWIG_AsVal_unsigned_SS_int(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "pkg_new_ext" "', argument " "11"" of type '" "uint32_t""'");
  } 
  arg11 = (uint32_t)(val11);
  ecode12 = SWIG_AsVal_unsigned_SS_int(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "pkg_new_ext" "', argument " "12"" of type '" "uint32_t""'");
  } 
  arg12 = (uint32_t)(val12);
  result = (struct pkg *)pkg_new_ext(arg1,(char const *)arg2,arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9,arg10,arg11,arg12);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkg, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
  if (alloc7 == SWIG_NEWOBJ) free((char*)buf7);
  if (alloc8 == SWIG_NEWOBJ) free((char*)buf8);
  if (alloc9 == SWIG_NEWOBJ) free((char*)buf9);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
  if (alloc7 == SWIG_NEWOBJ) free((char*)buf7);
  if (alloc8 == SWIG_NEWOBJ) free((char*)buf8);
  if (alloc9 == SWIG_NEWOBJ) free((char*)buf9);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_free" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  pkg_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_link(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkg *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_link",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_link" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (struct pkg *)pkg_link(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkg, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_set_arch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_set_arch",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_set_arch" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_set_arch" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)pkg_set_arch(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_arch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_arch",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_arch" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_arch((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_arch_score(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_arch_score",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_arch_score" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (int)pkg_arch_score((struct pkg const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_os(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_os",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_os" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_os((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_set_os(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_set_os",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_set_os" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_set_os" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)pkg_set_os(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_caps_match_req(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  unsigned int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_caps_match_req",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_caps_match_req" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_caps_match_req" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_caps_match_req" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = (unsigned int)(val3);
  result = (int)pkg_caps_match_req((struct pkg const *)arg1,(struct capreq const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_evr_match_req(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  unsigned int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_evr_match_req",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_evr_match_req" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_evr_match_req" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_evr_match_req" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = (unsigned int)(val3);
  result = (int)pkg_evr_match_req((struct pkg const *)arg1,(struct capreq const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_cap_xmatch_req(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  unsigned int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:cap_xmatch_req",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cap_xmatch_req" "', argument " "1"" of type '" "struct capreq const *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cap_xmatch_req" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cap_xmatch_req" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = (unsigned int)(val3);
  result = (int)cap_xmatch_req((struct capreq const *)arg1,(struct capreq const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_cap_match_req(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct capreq *arg1 = (struct capreq *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:cap_match_req",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cap_match_req" "', argument " "1"" of type '" "struct capreq const *""'"); 
  }
  arg1 = (struct capreq *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cap_match_req" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cap_match_req" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)cap_match_req((struct capreq const *)arg1,(struct capreq const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_xmatch_req(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  unsigned int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_xmatch_req",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_xmatch_req" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_xmatch_req" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_xmatch_req" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = (unsigned int)(val3);
  result = (int)pkg_xmatch_req((struct pkg const *)arg1,(struct capreq const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_match_req(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_match_req",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_match_req" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_match_req" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_match_req" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)pkg_match_req((struct pkg const *)arg1,(struct capreq const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_has_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_has_path",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_has_path" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_has_path" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkg_has_path" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  result = (int)pkg_has_path((struct pkg const *)arg1,(char const *)arg2,(char const *)arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_satisfies_req(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_satisfies_req",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_satisfies_req" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_satisfies_req" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_satisfies_req" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)pkg_satisfies_req((struct pkg const *)arg1,(struct capreq const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_obsoletes_pkg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct pkg *arg2 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_obsoletes_pkg",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_obsoletes_pkg" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_obsoletes_pkg" "', argument " "2"" of type '" "struct pkg const *""'"); 
  }
  arg2 = (struct pkg *)(argp2);
  result = (int)pkg_obsoletes_pkg((struct pkg const *)arg1,(struct pkg const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_caps_obsoletes_pkg_caps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct pkg *arg2 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_caps_obsoletes_pkg_caps",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_caps_obsoletes_pkg_caps" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_caps_obsoletes_pkg_caps" "', argument " "2"" of type '" "struct pkg const *""'"); 
  }
  arg2 = (struct pkg *)(argp2);
  result = (int)pkg_caps_obsoletes_pkg_caps((struct pkg const *)arg1,(struct pkg const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_requires_cap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct capreq *arg2 = (struct capreq *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct capreq *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_requires_cap",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_requires_cap" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_capreq, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_requires_cap" "', argument " "2"" of type '" "struct capreq const *""'"); 
  }
  arg2 = (struct capreq *)(argp2);
  result = (struct capreq *)pkg_requires_cap((struct pkg const *)arg1,(struct capreq const *)arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_capreq, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_add_pkgcnfl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct pkg *arg2 = (struct pkg *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_add_pkgcnfl",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_add_pkgcnfl" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_add_pkgcnfl" "', argument " "2"" of type '" "struct pkg *""'"); 
  }
  arg2 = (struct pkg *)(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_add_pkgcnfl" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)pkg_add_pkgcnfl(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_has_pkgcnfl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  struct pkg *arg2 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_has_pkgcnfl",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_has_pkgcnfl" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_has_pkgcnfl" "', argument " "2"" of type '" "struct pkg *""'"); 
  }
  arg2 = (struct pkg *)(argp2);
  result = (int)pkg_has_pkgcnfl(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_srcfilename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  size_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_srcfilename",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_srcfilename" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_srcfilename" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_srcfilename" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = (size_t)(val3);
  result = (char *)pkg_srcfilename((struct pkg const *)arg1,arg2,arg3);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_srcfilename_s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_srcfilename_s",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_srcfilename_s" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_srcfilename_s((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  size_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_filename",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_filename" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_filename" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_filename" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = (size_t)(val3);
  result = (char *)pkg_filename((struct pkg const *)arg1,arg2,arg3);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_filename_s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_filename_s",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_filename_s" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_filename_s((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  size_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_path",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_path" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_path" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_path" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = (size_t)(val3);
  result = (char *)pkg_path((struct pkg const *)arg1,arg2,arg3);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_path_s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_path_s",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_path_s" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_path_s((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_localpath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  size_t arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:pkg_localpath",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_localpath" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_localpath" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkg_localpath" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = (size_t)(val3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkg_localpath" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  result = (char *)pkg_localpath((struct pkg const *)arg1,arg2,arg3,(char const *)arg4);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_pkgdirpath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_pkgdirpath",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_pkgdirpath" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_pkgdirpath((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_file_url_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  unsigned int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_file_url_type",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_file_url_type" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (unsigned int)pkg_file_url_type((struct pkg const *)arg1);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_id",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_id" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_id((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_id_snprintf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  size_t arg2 ;
  struct pkg *arg3 = (struct pkg *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_id_snprintf",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_id_snprintf" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_id_snprintf" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = (size_t)(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkg_id_snprintf" "', argument " "3"" of type '" "struct pkg const *""'"); 
  }
  arg3 = (struct pkg *)(argp3);
  result = (int)pkg_id_snprintf(arg1,arg2,(struct pkg const *)arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_idevr_snprintf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  size_t arg2 ;
  struct pkg *arg3 = (struct pkg *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_idevr_snprintf",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_idevr_snprintf" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_idevr_snprintf" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = (size_t)(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkg_idevr_snprintf" "', argument " "3"" of type '" "struct pkg const *""'"); 
  }
  arg3 = (struct pkg *)(argp3);
  result = (int)pkg_idevr_snprintf(arg1,arg2,(struct pkg const *)arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_printf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_printf",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_printf" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_printf" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)pkg_printf((struct pkg const *)arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_snprintf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  size_t arg2 ;
  struct pkg *arg3 = (struct pkg *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_snprintf",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_snprintf" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_snprintf" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = (size_t)(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkg_snprintf" "', argument " "3"" of type '" "struct pkg const *""'"); 
  }
  arg3 = (struct pkg *)(argp3);
  result = (int)pkg_snprintf(arg1,arg2,(struct pkg const *)arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_snprintf_s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_snprintf_s",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_snprintf_s" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_snprintf_s((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_snprintf_s0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_snprintf_s0",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_snprintf_s0" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_snprintf_s0((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_snprintf_s1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_snprintf_s1",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_snprintf_s1" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_snprintf_s1((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_evr_snprintf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  size_t arg2 ;
  struct pkg *arg3 = (struct pkg *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_evr_snprintf",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_evr_snprintf" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_evr_snprintf" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = (size_t)(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkg_evr_snprintf" "', argument " "3"" of type '" "struct pkg const *""'"); 
  }
  arg3 = (struct pkg *)(argp3);
  result = (int)pkg_evr_snprintf(arg1,arg2,(struct pkg const *)arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_evr_snprintf_s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_evr_snprintf_s",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_evr_snprintf_s" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_evr_snprintf_s((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_uinf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkguinf *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_uinf",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_uinf" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (struct pkguinf *)pkg_uinf((struct pkg const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkguinf, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_xuinf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct pkguinf *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkg_xuinf",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_xuinf" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkg_xuinf" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  result = (struct pkguinf *)pkg_xuinf((struct pkg const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkguinf, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_required_dirs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_required_dirs",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_required_dirs" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (tn_array *)pkg_required_dirs((struct pkg const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgflist_fl_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist *arg1 = (struct pkgflist *) 0 ;
  tn_tuple *arg2 = (tn_tuple *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgflist_fl_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgflist_fl_set" "', argument " "1"" of type '" "struct pkgflist *""'"); 
  }
  arg1 = (struct pkgflist *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_tn_tuple, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgflist_fl_set" "', argument " "2"" of type '" "tn_tuple *""'"); 
  }
  arg2 = (tn_tuple *)(argp2);
  if (arg1) (arg1)->fl = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgflist_fl_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist *arg1 = (struct pkgflist *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_tuple *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgflist_fl_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgflist_fl_get" "', argument " "1"" of type '" "struct pkgflist *""'"); 
  }
  arg1 = (struct pkgflist *)(argp1);
  result = (tn_tuple *) ((arg1)->fl);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tn_tuple, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgflist__na_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist *arg1 = (struct pkgflist *) 0 ;
  tn_alloc *arg2 = (tn_alloc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgflist__na_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgflist__na_set" "', argument " "1"" of type '" "struct pkgflist *""'"); 
  }
  arg1 = (struct pkgflist *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_tn_alloc, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgflist__na_set" "', argument " "2"" of type '" "tn_alloc *""'"); 
  }
  arg2 = (tn_alloc *)(argp2);
  if (arg1) (arg1)->_na = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgflist__na_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist *arg1 = (struct pkgflist *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_alloc *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgflist__na_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgflist__na_get" "', argument " "1"" of type '" "struct pkgflist *""'"); 
  }
  arg1 = (struct pkgflist *)(argp1);
  result = (tn_alloc *) ((arg1)->_na);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tn_alloc, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_pkgflist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_pkgflist")) SWIG_fail;
  result = (struct pkgflist *)calloc(1, sizeof(struct pkgflist));
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgflist, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_pkgflist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist *arg1 = (struct pkgflist *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_pkgflist",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pkgflist" "', argument " "1"" of type '" "struct pkgflist *""'"); 
  }
  arg1 = (struct pkgflist *)(argp1);
  free((char *) arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *pkgflist_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_pkgflist, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_pkg_get_nodep_flist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkgflist *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_get_nodep_flist",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_get_nodep_flist" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (struct pkgflist *)pkg_get_nodep_flist((struct pkg const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgflist, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_get_flist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkgflist *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_get_flist",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_get_flist" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (struct pkgflist *)pkg_get_flist((struct pkg const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgflist, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgflist_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist *arg1 = (struct pkgflist *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgflist_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgflist_free" "', argument " "1"" of type '" "struct pkgflist *""'"); 
  }
  arg1 = (struct pkgflist *)(argp1);
  pkgflist_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_get_flist_it(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkgflist_it *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_get_flist_it",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_get_flist_it" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (struct pkgflist_it *)pkg_get_flist_it((struct pkg const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgflist_it, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgflist_it_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist_it *arg1 = (struct pkgflist_it *) 0 ;
  struct flfile **arg2 = (struct flfile **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgflist_it_get",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist_it, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgflist_it_get" "', argument " "1"" of type '" "struct pkgflist_it *""'"); 
  }
  arg1 = (struct pkgflist_it *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_flfile, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgflist_it_get" "', argument " "2"" of type '" "struct flfile **""'"); 
  }
  arg2 = (struct flfile **)(argp2);
  result = (char *)pkgflist_it_get(arg1,arg2);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgflist_it_get_rawargs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist_it *arg1 = (struct pkgflist_it *) 0 ;
  uint32_t *arg2 = (uint32_t *) 0 ;
  uint16_t *arg3 = (uint16_t *) 0 ;
  char **arg4 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:pkgflist_it_get_rawargs",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist_it, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgflist_it_get_rawargs" "', argument " "1"" of type '" "struct pkgflist_it *""'"); 
  }
  arg1 = (struct pkgflist_it *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgflist_it_get_rawargs" "', argument " "2"" of type '" "uint32_t *""'"); 
  }
  arg2 = (uint32_t *)(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_short, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkgflist_it_get_rawargs" "', argument " "3"" of type '" "uint16_t *""'"); 
  }
  arg3 = (uint16_t *)(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_char, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkgflist_it_get_rawargs" "', argument " "4"" of type '" "char const **""'"); 
  }
  arg4 = (char **)(argp4);
  result = (char *)pkgflist_it_get_rawargs(arg1,arg2,arg3,(char const **)arg4);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgflist_it_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist_it *arg1 = (struct pkgflist_it *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgflist_it_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist_it, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgflist_it_free" "', argument " "1"" of type '" "struct pkgflist_it *""'"); 
  }
  arg1 = (struct pkgflist_it *)(argp1);
  pkgflist_it_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_group(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_group",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_group" "', argument " "1"" of type '" "struct pkg const *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (char *)pkg_group((struct pkg const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_strsize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  struct pkg *arg3 = (struct pkg *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_strsize",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_strsize" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_strsize" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkg_strsize" "', argument " "3"" of type '" "struct pkg const *""'"); 
  }
  arg3 = (struct pkg *)(argp3);
  result = (char *)pkg_strsize(arg1,arg2,(struct pkg const *)arg3);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_strbtime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  struct pkg *arg3 = (struct pkg *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_strbtime",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_strbtime" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_strbtime" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkg_strbtime" "', argument " "3"" of type '" "struct pkg const *""'"); 
  }
  arg3 = (struct pkg *)(argp3);
  result = (char *)pkg_strbtime(arg1,arg2,(struct pkg const *)arg3);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_stritime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  struct pkg *arg3 = (struct pkg *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkg_stritime",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_stritime" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkg_stritime" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkg_stritime" "', argument " "3"" of type '" "struct pkg const *""'"); 
  }
  arg3 = (struct pkg *)(argp3);
  result = (char *)pkg_stritime(arg1,arg2,(struct pkg const *)arg3);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkg_add_selfcap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkg *arg1 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkg_add_selfcap",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkg_add_selfcap" "', argument " "1"" of type '" "struct pkg *""'"); 
  }
  arg1 = (struct pkg *)(argp1);
  result = (int)pkg_add_selfcap(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkguinf_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_alloc *arg1 = (tn_alloc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkguinf *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkguinf_new",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tn_alloc, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkguinf_new" "', argument " "1"" of type '" "tn_alloc *""'"); 
  }
  arg1 = (tn_alloc *)(argp1);
  result = (struct pkguinf *)pkguinf_new(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkguinf, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkguinf_link(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkguinf *arg1 = (struct pkguinf *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkguinf *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkguinf_link",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkguinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkguinf_link" "', argument " "1"" of type '" "struct pkguinf *""'"); 
  }
  arg1 = (struct pkguinf *)(argp1);
  result = (struct pkguinf *)pkguinf_link(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkguinf, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkguinf_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkguinf *arg1 = (struct pkguinf *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkguinf_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkguinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkguinf_free" "', argument " "1"" of type '" "struct pkguinf *""'"); 
  }
  arg1 = (struct pkguinf *)(argp1);
  pkguinf_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkguinf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkguinf *arg1 = (struct pkguinf *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkguinf_get",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkguinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkguinf_get" "', argument " "1"" of type '" "struct pkguinf const *""'"); 
  }
  arg1 = (struct pkguinf *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkguinf_get" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (char *)pkguinf_get((struct pkguinf const *)arg1,arg2);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkguinf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkguinf *arg1 = (struct pkguinf *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:pkguinf_set",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkguinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkguinf_set" "', argument " "1"" of type '" "struct pkguinf *""'"); 
  }
  arg1 = (struct pkguinf *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkguinf_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkguinf_set" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkguinf_set" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  result = (int)pkguinf_set(arg1,arg2,(char const *)arg3,(char const *)arg4);
  resultobj = SWIG_From_int((int)(result));
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkguinf_get_changelog(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkguinf *arg1 = (struct pkguinf *) 0 ;
  time_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkguinf_get_changelog",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkguinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkguinf_get_changelog" "', argument " "1"" of type '" "struct pkguinf *""'"); 
  }
  arg1 = (struct pkguinf *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_time_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkguinf_get_changelog" "', argument " "2"" of type '" "time_t""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pkguinf_get_changelog" "', argument " "2"" of type '" "time_t""'");
    } else {
      arg2 = *((time_t *)(argp2));
    }
  }
  result = (char *)pkguinf_get_changelog(arg1,arg2);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkguinf_changelog_with_security_fixes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkguinf *arg1 = (struct pkguinf *) 0 ;
  time_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkguinf_changelog_with_security_fixes",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkguinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkguinf_changelog_with_security_fixes" "', argument " "1"" of type '" "struct pkguinf *""'"); 
  }
  arg1 = (struct pkguinf *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_time_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkguinf_changelog_with_security_fixes" "', argument " "2"" of type '" "time_t""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pkguinf_changelog_with_security_fixes" "', argument " "2"" of type '" "time_t""'");
    } else {
      arg2 = *((time_t *)(argp2));
    }
  }
  result = (int)pkguinf_changelog_with_security_fixes(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkguinf_langs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkguinf *arg1 = (struct pkguinf *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkguinf_langs",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkguinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkguinf_langs" "', argument " "1"" of type '" "struct pkguinf *""'"); 
  }
  arg1 = (struct pkguinf *)(argp1);
  result = (tn_array *)pkguinf_langs(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN int Swig_var_poldek_BUG_MAILADDR_set(PyObject *_val SWIGUNUSED) {
  SWIG_Error(SWIG_AttributeError,"Variable poldek_BUG_MAILADDR is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_poldek_BUG_MAILADDR_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_FromCharPtr(poldek_BUG_MAILADDR);
  return pyobj;
}


SWIGINTERN int Swig_var_poldek_VERSION_BANNER_set(PyObject *_val SWIGUNUSED) {
  SWIG_Error(SWIG_AttributeError,"Variable poldek_VERSION_BANNER is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_poldek_VERSION_BANNER_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_FromCharPtr(poldek_VERSION_BANNER);
  return pyobj;
}


SWIGINTERN int Swig_var_poldek_BANNER_set(PyObject *_val SWIGUNUSED) {
  SWIG_Error(SWIG_AttributeError,"Variable poldek_BANNER is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_poldek_BANNER_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_FromCharPtr(poldek_BANNER);
  return pyobj;
}


SWIGINTERN PyObject *_wrap_poldeklib_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)":poldeklib_init")) SWIG_fail;
  result = (int)poldeklib_init();
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldeklib_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_ParseTuple(args,(char *)":poldeklib_destroy")) SWIG_fail;
  poldeklib_destroy();
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  unsigned int arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  struct poldek_ctx *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_new",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "poldek_new" "', argument " "1"" of type '" "unsigned int""'");
  } 
  arg1 = (unsigned int)(val1);
  result = (struct poldek_ctx *)poldek_new(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poldek_ctx, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_free" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  poldek_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_link(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct poldek_ctx *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_link",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_link" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (struct poldek_ctx *)poldek_link(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poldek_ctx, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_configure__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  int arg2 ;
  void *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_configure",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_configure" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_configure" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)poldek_configure(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_configure(PyObject *self, PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,2);
  varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args)+1);
  resultobj = _wrap_poldek_configure__varargs__(self,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_poldek_load_config(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  char *arg2 = (char *) 0 ;
  tn_array *arg3 = (tn_array *) 0 ;
  unsigned int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  unsigned int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:poldek_load_config",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_load_config" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poldek_load_config" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "poldek_load_config" "', argument " "3"" of type '" "tn_array *""'"); 
  }
  arg3 = (tn_array *)(argp3);
  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "poldek_load_config" "', argument " "4"" of type '" "unsigned int""'");
  } 
  arg4 = (unsigned int)(val4);
  result = (int)poldek_load_config(arg1,(char const *)arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_setup_cachedir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_setup_cachedir",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_setup_cachedir" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (int)poldek_setup_cachedir(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_setup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_setup",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_setup" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (int)poldek_setup(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_load_sources(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_load_sources",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_load_sources" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (int)poldek_load_sources(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_is_interactive_on(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_is_interactive_on",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_is_interactive_on" "', argument " "1"" of type '" "struct poldek_ctx const *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (int)poldek_is_interactive_on((struct poldek_ctx const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_get_sources(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_get_sources",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_get_sources" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (tn_array *)poldek_get_sources(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_get_pkgdirs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_get_pkgdirs",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_get_pkgdirs" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (tn_array *)poldek_get_pkgdirs(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_get_pmctx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pm_ctx *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_get_pmctx",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_get_pmctx" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (struct pm_ctx *)poldek_get_pmctx(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pm_ctx, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_get_config(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_hash *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_get_config",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_get_config" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (tn_hash *)poldek_get_config(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tn_hash, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_search_avail_packages(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  enum poldek_search_tag arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:poldek_search_avail_packages",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_search_avail_packages" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_search_avail_packages" "', argument " "2"" of type '" "enum poldek_search_tag""'");
  } 
  arg2 = (enum poldek_search_tag)(val2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "poldek_search_avail_packages" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  result = (tn_array *)poldek_search_avail_packages(arg1,arg2,(char const *)arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_get_avail_packages(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_get_avail_packages",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_get_avail_packages" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (tn_array *)poldek_get_avail_packages(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_load_destination_pkgdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_load_destination_pkgdir",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_load_destination_pkgdir" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_load_destination_pkgdir" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (struct pkgdir *)poldek_load_destination_pkgdir(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_split(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  unsigned int arg2 ;
  unsigned int arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:poldek_split",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_split" "', argument " "1"" of type '" "struct poldek_ctx const *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_split" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "poldek_split" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = (unsigned int)(val3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "poldek_split" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  result = (int)poldek_split((struct poldek_ctx const *)arg1,arg2,arg3,(char const *)arg4);
  resultobj = SWIG_From_int((int)(result));
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct poldek_ts *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_new",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_new" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_new" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (struct poldek_ts *)poldek_ts_new(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poldek_ts, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_ts_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_free" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  poldek_ts_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_ts_get_type",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_get_type" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  result = (int)poldek_ts_get_type(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_set_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  enum poldek_ts_type arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:poldek_ts_set_type",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_set_type" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_set_type" "', argument " "2"" of type '" "enum poldek_ts_type""'");
  } 
  arg2 = (enum poldek_ts_type)(val2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "poldek_ts_set_type" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  result = (int)poldek_ts_set_type(arg1,arg2,(char const *)arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_setf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_setf",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_setf" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_setf" "', argument " "2"" of type '" "uint32_t""'");
  } 
  arg2 = (uint32_t)(val2);
  poldek_ts_setf(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_clrf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_clrf",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_clrf" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_clrf" "', argument " "2"" of type '" "uint32_t""'");
  } 
  arg2 = (uint32_t)(val2);
  poldek_ts_clrf(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_issetf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  uint32_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_issetf",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_issetf" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_issetf" "', argument " "2"" of type '" "uint32_t""'");
  } 
  arg2 = (uint32_t)(val2);
  result = (uint32_t)poldek_ts_issetf(arg1,arg2);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_issetf_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  uint32_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_issetf_all",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_issetf_all" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_issetf_all" "', argument " "2"" of type '" "uint32_t""'");
  } 
  arg2 = (uint32_t)(val2);
  result = (int)poldek_ts_issetf_all(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_setop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:poldek_ts_setop",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_setop" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_setop" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "poldek_ts_setop" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  poldek_ts_setop(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_getop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_getop",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_getop" "', argument " "1"" of type '" "struct poldek_ts const *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_getop" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)poldek_ts_getop((struct poldek_ts const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_op_touched(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_op_touched",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_op_touched" "', argument " "1"" of type '" "struct poldek_ts const *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_op_touched" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)poldek_ts_op_touched((struct poldek_ts const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_is_interactive_on(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_ts_is_interactive_on",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_is_interactive_on" "', argument " "1"" of type '" "struct poldek_ts const *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  result = (int)poldek_ts_is_interactive_on((struct poldek_ts const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_configure__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  int arg2 ;
  void *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_configure",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_configure" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_configure" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)poldek_ts_configure(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_configure(PyObject *self, PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,2);
  varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args)+1);
  resultobj = _wrap_poldek_ts_configure__varargs__(self,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_poldek_ts_add_pkg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  struct pkg *arg2 = (struct pkg *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_add_pkg",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_add_pkg" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkg, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poldek_ts_add_pkg" "', argument " "2"" of type '" "struct pkg *""'"); 
  }
  arg2 = (struct pkg *)(argp2);
  result = (int)poldek_ts_add_pkg(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_add_pkgmask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_add_pkgmask",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_add_pkgmask" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poldek_ts_add_pkgmask" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)poldek_ts_add_pkgmask(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_add_pkgfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_add_pkgfile",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_add_pkgfile" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poldek_ts_add_pkgfile" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)poldek_ts_add_pkgfile(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_add_pkglist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_add_pkglist",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_add_pkglist" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poldek_ts_add_pkglist" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)poldek_ts_add_pkglist(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_clean_args(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_ts_clean_args",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_clean_args" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  poldek_ts_clean_args(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_get_args_asmasks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_get_args_asmasks",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_get_args_asmasks" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_get_args_asmasks" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (tn_array *)poldek_ts_get_args_asmasks(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_get_arg_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_ts_get_arg_count",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_get_arg_count" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  result = (int)poldek_ts_get_arg_count(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_run(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_run",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_run" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ts_run" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (int)poldek_ts_run(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ts_get_summary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ts_get_summary",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ts_get_summary" "', argument " "1"" of type '" "struct poldek_ts const *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poldek_ts_get_summary" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (tn_array *)poldek_ts_get_summary((struct poldek_ts const *)arg1,(char const *)arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN int Swig_var_source_TYPE_GROUP_set(PyObject *_val SWIGUNUSED) {
  SWIG_Error(SWIG_AttributeError,"Variable source_TYPE_GROUP is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_source_TYPE_GROUP_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_FromCharPtr(source_TYPE_GROUP);
  return pyobj;
}


SWIGINTERN PyObject *_wrap_source_flags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_flags_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_flags_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "source_flags_set" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  if (arg1) (arg1)->flags = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_flags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  unsigned int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_flags_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_flags_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (unsigned int) ((arg1)->flags);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_type_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_type_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_type_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->type) free((char*)arg1->type);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->type = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->type = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_type_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_type_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (char *) ((arg1)->type);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_name_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_name_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_name_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->name) free((char*)arg1->name);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->name = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_name_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_name_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (char *) ((arg1)->name);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_path_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_path_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_path_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_path_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->path) free((char*)arg1->path);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->path = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->path = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_path_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_path_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_path_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (char *) ((arg1)->path);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_pkg_prefix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_pkg_prefix_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_pkg_prefix_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_pkg_prefix_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->pkg_prefix) free((char*)arg1->pkg_prefix);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->pkg_prefix = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->pkg_prefix = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_pkg_prefix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_pkg_prefix_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_pkg_prefix_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (char *) ((arg1)->pkg_prefix);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_compress_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_compress_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_compress_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_compress_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->compress) free((char*)arg1->compress);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->compress = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->compress = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_compress_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_compress_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_compress_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (char *) ((arg1)->compress);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_pri_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_pri_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_pri_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "source_pri_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->pri = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_pri_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_pri_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_pri_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (int) ((arg1)->pri);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_no_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_no_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_no_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "source_no_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->no = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_no_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_no_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_no_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (int) ((arg1)->no);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_dscr_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_dscr_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_dscr_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_dscr_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->dscr) free((char*)arg1->dscr);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->dscr = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->dscr = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_dscr_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_dscr_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_dscr_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (char *) ((arg1)->dscr);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_lc_lang_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_lc_lang_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_lc_lang_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_lc_lang_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->lc_lang) free((char*)arg1->lc_lang);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->lc_lang = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->lc_lang = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_lc_lang_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_lc_lang_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_lc_lang_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (char *) ((arg1)->lc_lang);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_exclude_path_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_exclude_path_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_exclude_path_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_exclude_path_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->exclude_path = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_exclude_path_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_exclude_path_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_exclude_path_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (tn_array *) ((arg1)->exclude_path);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_ign_patterns_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_ign_patterns_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_ign_patterns_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_ign_patterns_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->ign_patterns = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_ign_patterns_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_ign_patterns_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_ign_patterns_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (tn_array *) ((arg1)->ign_patterns);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_original_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_original_type_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_original_type_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_original_type_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->original_type) free((char*)arg1->original_type);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->original_type = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->original_type = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_original_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_original_type_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_original_type_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (char *) ((arg1)->original_type);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_subopt_flags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_subopt_flags_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_subopt_flags_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "source_subopt_flags_set" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  if (arg1) (arg1)->subopt_flags = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_subopt_flags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  unsigned int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_subopt_flags_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_subopt_flags_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (unsigned int) ((arg1)->subopt_flags);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source__refcnt_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source__refcnt_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source__refcnt_set" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "source__refcnt_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->_refcnt = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source__refcnt_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source__refcnt_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source__refcnt_get" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (int) ((arg1)->_refcnt);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_source__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_source",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_source" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_source" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_source" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_source" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  result = (struct source *)new_source__SWIG_0((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_source__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_source",&obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_source" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (struct source *)new_source__SWIG_1((char const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_source__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  int res1 ;
  PyObject * obj0 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_source",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_source" "', argument " "1"" of type '" "void *""'"); 
  }
  result = (struct source *)new_source__SWIG_2(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_source(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[5];
  int ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = (int)PyObject_Length(args);
  for (ii = 0; (ii < argc) && (ii < 4); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_source__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_source__SWIG_1(self, args);
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_new_source__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_source'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    source(char const *,char const *,char const *,char const *)\n"
    "    source(char const *)\n"
    "    source(void *)\n");
  return NULL;
}


SWIGINTERN PyObject *_wrap_source___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source___str__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source___str__" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (char *)source___str__(arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_get_enabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_get_enabled",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_get_enabled" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (int)source_get_enabled(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_set_enabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_set_enabled",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_set_enabled" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "source_set_enabled" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  source_set_enabled(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_source",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_source" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  delete_source(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *source_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_source, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_source_malloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":source_malloc")) SWIG_fail;
  result = (struct source *)source_malloc();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:source_new",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_new" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_new" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "source_new" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "source_new" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  result = (struct source *)source_new((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_new_pathspec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:source_new_pathspec",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_new_pathspec" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_new_pathspec" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "source_new_pathspec" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  result = (struct source *)source_new_pathspec((char const *)arg1,(char const *)arg2,(char const *)arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_new_htcnf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_hash *arg1 = (tn_hash *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_new_htcnf",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tn_hash, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_new_htcnf" "', argument " "1"" of type '" "tn_hash const *""'"); 
  }
  arg1 = (tn_hash *)(argp1);
  result = (struct source *)source_new_htcnf((tn_hash const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_free" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  source_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_link(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_link",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_link" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (struct source *)source_link(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_set_pkg_prefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_set_pkg_prefix",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_set_pkg_prefix" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_set_pkg_prefix" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (struct source *)source_set_pkg_prefix(arg1,(char const *)arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_set_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_set_type",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_set_type" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_set_type" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (struct source *)source_set_type(arg1,(char const *)arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_set_default_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_set_default_type",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_set_default_type" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (struct source *)source_set_default_type(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_cmp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  struct source *arg2 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_cmp",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_cmp" "', argument " "1"" of type '" "struct source const *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_cmp" "', argument " "2"" of type '" "struct source const *""'"); 
  }
  arg2 = (struct source *)(argp2);
  result = (int)source_cmp((struct source const *)arg1,(struct source const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_cmp_uniq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  struct source *arg2 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_cmp_uniq",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_cmp_uniq" "', argument " "1"" of type '" "struct source const *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_cmp_uniq" "', argument " "2"" of type '" "struct source const *""'"); 
  }
  arg2 = (struct source *)(argp2);
  result = (int)source_cmp_uniq((struct source const *)arg1,(struct source const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_cmp_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  struct source *arg2 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_cmp_name",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_cmp_name" "', argument " "1"" of type '" "struct source const *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_cmp_name" "', argument " "2"" of type '" "struct source const *""'"); 
  }
  arg2 = (struct source *)(argp2);
  result = (int)source_cmp_name((struct source const *)arg1,(struct source const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_cmp_pri(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  struct source *arg2 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_cmp_pri",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_cmp_pri" "', argument " "1"" of type '" "struct source const *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_cmp_pri" "', argument " "2"" of type '" "struct source const *""'"); 
  }
  arg2 = (struct source *)(argp2);
  result = (int)source_cmp_pri((struct source const *)arg1,(struct source const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_cmp_pri_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  struct source *arg2 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_cmp_pri_name",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_cmp_pri_name" "', argument " "1"" of type '" "struct source const *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_cmp_pri_name" "', argument " "2"" of type '" "struct source const *""'"); 
  }
  arg2 = (struct source *)(argp2);
  result = (int)source_cmp_pri_name((struct source const *)arg1,(struct source const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_cmp_no(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  struct source *arg2 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_cmp_no",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_cmp_no" "', argument " "1"" of type '" "struct source const *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_cmp_no" "', argument " "2"" of type '" "struct source const *""'"); 
  }
  arg2 = (struct source *)(argp2);
  result = (int)source_cmp_no((struct source const *)arg1,(struct source const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_update",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_update" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "source_update" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (int)source_update(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_printf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:source_printf",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_printf" "', argument " "1"" of type '" "struct source const *""'"); 
  }
  arg1 = (struct source *)(argp1);
  source_printf((struct source const *)arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sources_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:sources_update",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sources_update" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sources_update" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (int)sources_update(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_clean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:source_clean",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_clean" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "source_clean" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (int)source_clean(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sources_clean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:sources_clean",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sources_clean" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sources_clean" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (int)sources_clean(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_make_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  unsigned int arg5 ;
  tn_hash *arg6 = (tn_hash *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  unsigned int val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:source_make_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_make_idx" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_make_idx" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "source_make_idx" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "source_make_idx" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "source_make_idx" "', argument " "5"" of type '" "unsigned int""'");
  } 
  arg5 = (unsigned int)(val5);
  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_tn_hash, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "source_make_idx" "', argument " "6"" of type '" "tn_hash *""'"); 
  }
  arg6 = (tn_hash *)(argp6);
  result = (int)source_make_idx(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_source_make_merged_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  unsigned int arg4 ;
  tn_hash *arg5 = (tn_hash *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  unsigned int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOO:source_make_merged_idx",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "source_make_merged_idx" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "source_make_merged_idx" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "source_make_merged_idx" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "source_make_merged_idx" "', argument " "4"" of type '" "unsigned int""'");
  } 
  arg4 = (unsigned int)(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_tn_hash, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "source_make_merged_idx" "', argument " "5"" of type '" "tn_hash *""'"); 
  }
  arg5 = (tn_hash *)(argp5);
  result = (int)source_make_merged_idx(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_sources_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  struct source *arg2 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:sources_add",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sources_add" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sources_add" "', argument " "2"" of type '" "struct source *""'"); 
  }
  arg2 = (struct source *)(argp2);
  result = (int)sources_add(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sources_score(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *arg1 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:sources_score",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sources_score" "', argument " "1"" of type '" "tn_array *""'"); 
  }
  arg1 = (tn_array *)(argp1);
  sources_score(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_type_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_type_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->type) free((char*)arg1->type);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->type = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->type = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_type_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (char *) ((arg1)->type);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_name_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_name_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_name_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->name) free((char*)arg1->name);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->name = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_name_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_name_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (char *) ((arg1)->name);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_path_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_path_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_path_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_path_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->path) free((char*)arg1->path);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->path = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->path = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_path_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_path_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_path_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (char *) ((arg1)->path);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_idxpath_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_idxpath_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_idxpath_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_idxpath_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->idxpath) free((char*)arg1->idxpath);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->idxpath = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->idxpath = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_idxpath_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_idxpath_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_idxpath_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (char *) ((arg1)->idxpath);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_compress_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_compress_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_compress_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_compress_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->compress) free((char*)arg1->compress);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->compress = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->compress = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_compress_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_compress_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_compress_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (char *) ((arg1)->compress);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_pkgs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_pkgs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_pkgs_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_pkgs_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->pkgs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_pkgs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_pkgs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_pkgs_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (tn_array *) ((arg1)->pkgs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir__idx_version_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir__idx_version_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir__idx_version_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkgdir__idx_version_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->_idx_version = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir__idx_version_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir__idx_version_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir__idx_version_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (int) ((arg1)->_idx_version);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_pri_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_pri_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_pri_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkgdir_pri_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->pri = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_pri_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_pri_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_pri_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (int) ((arg1)->pri);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_depdirs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_depdirs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_depdirs_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_depdirs_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->depdirs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_depdirs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_depdirs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_depdirs_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (tn_array *) ((arg1)->depdirs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_foreign_depdirs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_foreign_depdirs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_foreign_depdirs_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_foreign_depdirs_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->foreign_depdirs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_foreign_depdirs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_foreign_depdirs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_foreign_depdirs_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (tn_array *) ((arg1)->foreign_depdirs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_pkgroups_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  struct pkgroup_idx *arg2 = (struct pkgroup_idx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_pkgroups_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_pkgroups_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkgroup_idx, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_pkgroups_set" "', argument " "2"" of type '" "struct pkgroup_idx *""'"); 
  }
  arg2 = (struct pkgroup_idx *)(argp2);
  if (arg1) (arg1)->pkgroups = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_pkgroups_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkgroup_idx *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_pkgroups_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_pkgroups_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (struct pkgroup_idx *) ((arg1)->pkgroups);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgroup_idx, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_flags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_flags_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_flags_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkgdir_flags_set" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  if (arg1) (arg1)->flags = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_flags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  unsigned int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_flags_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_flags_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (unsigned int) ((arg1)->flags);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_ts_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  time_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_ts_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_ts_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_time_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_ts_set" "', argument " "2"" of type '" "time_t""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pkgdir_ts_set" "', argument " "2"" of type '" "time_t""'");
    } else {
      arg2 = *((time_t *)(argp2));
    }
  }
  if (arg1) (arg1)->ts = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_ts_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  time_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_ts_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_ts_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result =  ((arg1)->ts);
  resultobj = SWIG_NewPointerObj((time_t *)memcpy((time_t *)malloc(sizeof(time_t)),&result,sizeof(time_t)), SWIGTYPE_p_time_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_removed_pkgs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_removed_pkgs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_removed_pkgs_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_removed_pkgs_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->removed_pkgs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_removed_pkgs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_removed_pkgs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_removed_pkgs_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (tn_array *) ((arg1)->removed_pkgs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_orig_ts_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  time_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_orig_ts_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_orig_ts_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_time_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_orig_ts_set" "', argument " "2"" of type '" "time_t""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pkgdir_orig_ts_set" "', argument " "2"" of type '" "time_t""'");
    } else {
      arg2 = *((time_t *)(argp2));
    }
  }
  if (arg1) (arg1)->orig_ts = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_orig_ts_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  time_t result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_orig_ts_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_orig_ts_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result =  ((arg1)->orig_ts);
  resultobj = SWIG_NewPointerObj((time_t *)memcpy((time_t *)malloc(sizeof(time_t)),&result,sizeof(time_t)), SWIGTYPE_p_time_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_orig_idxpath_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_orig_idxpath_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_orig_idxpath_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_orig_idxpath_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->orig_idxpath) free((char*)arg1->orig_idxpath);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->orig_idxpath = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->orig_idxpath = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_orig_idxpath_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_orig_idxpath_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_orig_idxpath_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (char *) ((arg1)->orig_idxpath);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_lc_lang_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_lc_lang_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_lc_lang_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_lc_lang_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->lc_lang) free((char*)arg1->lc_lang);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->lc_lang = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->lc_lang = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_lc_lang_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_lc_lang_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_lc_lang_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (char *) ((arg1)->lc_lang);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_avlangs_h_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  tn_hash *arg2 = (tn_hash *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_avlangs_h_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_avlangs_h_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_tn_hash, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_avlangs_h_set" "', argument " "2"" of type '" "tn_hash *""'"); 
  }
  arg2 = (tn_hash *)(argp2);
  if (arg1) (arg1)->avlangs_h = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_avlangs_h_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_hash *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_avlangs_h_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_avlangs_h_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (tn_hash *) ((arg1)->avlangs_h);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tn_hash, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_langs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_langs_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_langs_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_langs_set" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  if (arg1) (arg1)->langs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_langs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_langs_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_langs_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (tn_array *) ((arg1)->langs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_dirindex_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  struct pkgdir_dirindex *arg2 = (struct pkgdir_dirindex *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_dirindex_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_dirindex_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkgdir_dirindex, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_dirindex_set" "', argument " "2"" of type '" "struct pkgdir_dirindex *""'"); 
  }
  arg2 = (struct pkgdir_dirindex *)(argp2);
  if (arg1) (arg1)->dirindex = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_dirindex_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkgdir_dirindex *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_dirindex_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_dirindex_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (struct pkgdir_dirindex *) ((arg1)->dirindex);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir_dirindex, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_prev_pkgdir_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  struct pkgdir *arg2 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_prev_pkgdir_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_prev_pkgdir_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkgdir, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_prev_pkgdir_set" "', argument " "2"" of type '" "struct pkgdir *""'"); 
  }
  arg2 = (struct pkgdir *)(argp2);
  if (arg1) (arg1)->prev_pkgdir = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_prev_pkgdir_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_prev_pkgdir_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_prev_pkgdir_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (struct pkgdir *) ((arg1)->prev_pkgdir);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_src_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  struct source *arg2 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_src_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_src_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_source, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_src_set" "', argument " "2"" of type '" "struct source *""'"); 
  }
  arg2 = (struct source *)(argp2);
  if (arg1) (arg1)->src = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_src_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct source *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_src_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_src_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (struct source *) ((arg1)->src);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_source, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir__ldflags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir__ldflags_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir__ldflags_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkgdir__ldflags_set" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  if (arg1) (arg1)->_ldflags = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir__ldflags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  unsigned int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir__ldflags_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir__ldflags_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (unsigned int) ((arg1)->_ldflags);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_na_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  tn_alloc *arg2 = (tn_alloc *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_na_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_na_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_tn_alloc, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_na_set" "', argument " "2"" of type '" "tn_alloc *""'"); 
  }
  arg2 = (tn_alloc *)(argp2);
  if (arg1) (arg1)->na = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_na_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_alloc *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_na_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_na_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (tn_alloc *) ((arg1)->na);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tn_alloc, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_mod_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  struct pkgdir_module *arg2 = (struct pkgdir_module *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_mod_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_mod_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkgdir_module, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_mod_set" "', argument " "2"" of type '" "struct pkgdir_module const *""'"); 
  }
  arg2 = (struct pkgdir_module *)(argp2);
  if (arg1) (arg1)->mod = (struct pkgdir_module const *)arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_mod_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkgdir_module *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_mod_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_mod_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (struct pkgdir_module *) ((arg1)->mod);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir_module, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_mod_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_mod_data_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_mod_data_set" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_mod_data_set" "', argument " "2"" of type '" "void *""'"); 
  }
  if (arg1) (arg1)->mod_data = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_mod_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_mod_data_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_mod_data_get" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (void *) ((arg1)->mod_data);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_pkgdir__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_pkgdir",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_pkgdir" "', argument " "1"" of type '" "struct source *""'"); 
  }
  arg1 = (struct source *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_pkgdir" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (struct pkgdir *)new_pkgdir__SWIG_0(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_pkgdir__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  int res1 ;
  PyObject * obj0 = 0 ;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_pkgdir",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_pkgdir" "', argument " "1"" of type '" "void *""'"); 
  }
  result = (struct pkgdir *)new_pkgdir__SWIG_1(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_pkgdir(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  int ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = (int)PyObject_Length(args);
  for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_pkgdir__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_source, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_pkgdir__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_pkgdir'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    pkgdir(struct source *,unsigned int)\n"
    "    pkgdir(void *)\n");
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_get_packages(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_get_packages",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_get_packages" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (tn_array *)pkgdir_get_packages(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir___str__",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir___str__" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (char *)pkgdir___str__(arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_pkgdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_pkgdir",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pkgdir" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  delete_pkgdir(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *pkgdir_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_pkgdir, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_pkgdir_malloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":pkgdir_malloc")) SWIG_fail;
  result = (struct pkgdir *)pkgdir_malloc();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_free" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  pkgdir_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_srcopen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_srcopen",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_srcopen" "', argument " "1"" of type '" "struct source const *""'"); 
  }
  arg1 = (struct source *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkgdir_srcopen" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (struct pkgdir *)pkgdir_srcopen((struct source const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_open_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  unsigned int arg6 ;
  char *arg7 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  unsigned int val6 ;
  int ecode6 = 0 ;
  int res7 ;
  char *buf7 = 0 ;
  int alloc7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:pkgdir_open_ext",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_open_ext" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_open_ext" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkgdir_open_ext" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkgdir_open_ext" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pkgdir_open_ext" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = (char *)(buf5);
  ecode6 = SWIG_AsVal_unsigned_SS_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "pkgdir_open_ext" "', argument " "6"" of type '" "unsigned int""'");
  } 
  arg6 = (unsigned int)(val6);
  res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "pkgdir_open_ext" "', argument " "7"" of type '" "char const *""'");
  }
  arg7 = (char *)(buf7);
  result = (struct pkgdir *)pkgdir_open_ext((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,arg6,(char const *)arg7);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc7 == SWIG_NEWOBJ) free((char*)buf7);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc7 == SWIG_NEWOBJ) free((char*)buf7);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:pkgdir_open",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_open" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_open" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkgdir_open" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "pkgdir_open" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  result = (struct pkgdir *)pkgdir_open((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  tn_array *arg2 = (tn_array *) 0 ;
  unsigned int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:pkgdir_load",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_load" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_trurl_array_private, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_load" "', argument " "2"" of type '" "tn_array *""'"); 
  }
  arg2 = (tn_array *)(argp2);
  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pkgdir_load" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = (unsigned int)(val3);
  result = (int)pkgdir_load(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_save(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_save",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_save" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pkgdir_save" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (int)pkgdir_save(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_save_as(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  unsigned int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  unsigned int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:pkgdir_save_as",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_save_as" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_save_as" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pkgdir_save_as" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pkgdir_save_as" "', argument " "4"" of type '" "unsigned int""'");
  } 
  arg4 = (unsigned int)(val4);
  result = (int)pkgdir_save_as(arg1,(char const *)arg2,(char const *)arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_diff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  struct pkgdir *arg2 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_diff",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_diff" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_diff" "', argument " "2"" of type '" "struct pkgdir *""'"); 
  }
  arg2 = (struct pkgdir *)(argp2);
  result = (struct pkgdir *)pkgdir_diff(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_patch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  struct pkgdir *arg2 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct pkgdir *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_patch",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_patch" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_patch" "', argument " "2"" of type '" "struct pkgdir *""'"); 
  }
  arg2 = (struct pkgdir *)(argp2);
  result = (struct pkgdir *)pkgdir_patch(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_update",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_update" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (int)pkgdir_update(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_update_a(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct source *arg1 = (struct source *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_update_a",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_source, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_update_a" "', argument " "1"" of type '" "struct source const *""'"); 
  }
  arg1 = (struct source *)(argp1);
  result = (int)pkgdir_update_a((struct source const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_type_info",&obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_info" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (int)pkgdir_type_info((char const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_default_idxfn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_type_default_idxfn",&obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_default_idxfn" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (char *)pkgdir_type_default_idxfn((char const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_default_compr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_type_default_compr",&obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_default_compr" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (char *)pkgdir_type_default_compr((char const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_isremote(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir *arg1 = (struct pkgdir *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_isremote",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_isremote" "', argument " "1"" of type '" "struct pkgdir *""'"); 
  }
  arg1 = (struct pkgdir *)(argp1);
  result = (int)pkgdir_isremote(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_uinf_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir_type_uinf *arg1 = (struct pkgdir_type_uinf *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[32] ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_type_uinf_name_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir_type_uinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_uinf_name_set" "', argument " "1"" of type '" "struct pkgdir_type_uinf *""'"); 
  }
  arg1 = (struct pkgdir_type_uinf *)(argp1);
  res2 = SWIG_AsCharArray(obj1, temp2, 32);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_type_uinf_name_set" "', argument " "2"" of type '" "char [32]""'");
  }
  arg2 = (char *)(temp2);
  if (arg2) memcpy(arg1->name,arg2,32*sizeof(char));
  else memset(arg1->name,0,32*sizeof(char));
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_uinf_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir_type_uinf *arg1 = (struct pkgdir_type_uinf *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_type_uinf_name_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir_type_uinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_uinf_name_get" "', argument " "1"" of type '" "struct pkgdir_type_uinf *""'"); 
  }
  arg1 = (struct pkgdir_type_uinf *)(argp1);
  result = (char *)(char *) ((arg1)->name);
  {
    size_t size = 32;
    
    while (size && (result[size - 1] == '\0')) --size;
    
    resultobj = SWIG_FromCharPtrAndSize(result, size);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_uinf_aliases_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir_type_uinf *arg1 = (struct pkgdir_type_uinf *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[64] ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_type_uinf_aliases_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir_type_uinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_uinf_aliases_set" "', argument " "1"" of type '" "struct pkgdir_type_uinf *""'"); 
  }
  arg1 = (struct pkgdir_type_uinf *)(argp1);
  res2 = SWIG_AsCharArray(obj1, temp2, 64);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_type_uinf_aliases_set" "', argument " "2"" of type '" "char [64]""'");
  }
  arg2 = (char *)(temp2);
  if (arg2) memcpy(arg1->aliases,arg2,64*sizeof(char));
  else memset(arg1->aliases,0,64*sizeof(char));
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_uinf_aliases_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir_type_uinf *arg1 = (struct pkgdir_type_uinf *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_type_uinf_aliases_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir_type_uinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_uinf_aliases_get" "', argument " "1"" of type '" "struct pkgdir_type_uinf *""'"); 
  }
  arg1 = (struct pkgdir_type_uinf *)(argp1);
  result = (char *)(char *) ((arg1)->aliases);
  {
    size_t size = 64;
    
    while (size && (result[size - 1] == '\0')) --size;
    
    resultobj = SWIG_FromCharPtrAndSize(result, size);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_uinf_description_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir_type_uinf *arg1 = (struct pkgdir_type_uinf *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[62] ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_type_uinf_description_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir_type_uinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_uinf_description_set" "', argument " "1"" of type '" "struct pkgdir_type_uinf *""'"); 
  }
  arg1 = (struct pkgdir_type_uinf *)(argp1);
  res2 = SWIG_AsCharArray(obj1, temp2, 62);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_type_uinf_description_set" "', argument " "2"" of type '" "char [62]""'");
  }
  arg2 = (char *)(temp2);
  if (arg2) memcpy(arg1->description,arg2,62*sizeof(char));
  else memset(arg1->description,0,62*sizeof(char));
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_uinf_description_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir_type_uinf *arg1 = (struct pkgdir_type_uinf *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_type_uinf_description_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir_type_uinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_uinf_description_get" "', argument " "1"" of type '" "struct pkgdir_type_uinf *""'"); 
  }
  arg1 = (struct pkgdir_type_uinf *)(argp1);
  result = (char *)(char *) ((arg1)->description);
  {
    size_t size = 62;
    
    while (size && (result[size - 1] == '\0')) --size;
    
    resultobj = SWIG_FromCharPtrAndSize(result, size);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_uinf_mode_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir_type_uinf *arg1 = (struct pkgdir_type_uinf *) 0 ;
  char *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char temp2[8] ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:pkgdir_type_uinf_mode_set",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir_type_uinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_uinf_mode_set" "', argument " "1"" of type '" "struct pkgdir_type_uinf *""'"); 
  }
  arg1 = (struct pkgdir_type_uinf *)(argp1);
  res2 = SWIG_AsCharArray(obj1, temp2, 8);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pkgdir_type_uinf_mode_set" "', argument " "2"" of type '" "char [8]""'");
  }
  arg2 = (char *)(temp2);
  if (arg2) memcpy(arg1->mode,arg2,8*sizeof(char));
  else memset(arg1->mode,0,8*sizeof(char));
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgdir_type_uinf_mode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir_type_uinf *arg1 = (struct pkgdir_type_uinf *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgdir_type_uinf_mode_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir_type_uinf, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgdir_type_uinf_mode_get" "', argument " "1"" of type '" "struct pkgdir_type_uinf *""'"); 
  }
  arg1 = (struct pkgdir_type_uinf *)(argp1);
  result = (char *)(char *) ((arg1)->mode);
  {
    size_t size = 8;
    
    while (size && (result[size - 1] == '\0')) --size;
    
    resultobj = SWIG_FromCharPtrAndSize(result, size);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_pkgdir_type_uinf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir_type_uinf *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_pkgdir_type_uinf")) SWIG_fail;
  result = (struct pkgdir_type_uinf *)calloc(1, sizeof(struct pkgdir_type_uinf));
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgdir_type_uinf, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_pkgdir_type_uinf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgdir_type_uinf *arg1 = (struct pkgdir_type_uinf *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_pkgdir_type_uinf",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgdir_type_uinf, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pkgdir_type_uinf" "', argument " "1"" of type '" "struct pkgdir_type_uinf *""'"); 
  }
  arg1 = (struct pkgdir_type_uinf *)(argp1);
  free((char *) arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *pkgdir_type_uinf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_pkgdir_type_uinf, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_pkgdir_typelist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":pkgdir_typelist")) SWIG_fail;
  result = (tn_array *)pkgdir_typelist();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct poclidek_ctx *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poclidek_new",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_new" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (struct poclidek_ctx *)poclidek_new(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poclidek_ctx, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_ctx *arg1 = (struct poclidek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poclidek_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_free" "', argument " "1"" of type '" "struct poclidek_ctx *""'"); 
  }
  arg1 = (struct poclidek_ctx *)(argp1);
  poclidek_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_load_packages(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_ctx *arg1 = (struct poclidek_ctx *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poclidek_load_packages",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_load_packages" "', argument " "1"" of type '" "struct poclidek_ctx *""'"); 
  }
  arg1 = (struct poclidek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poclidek_load_packages" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (int)poclidek_load_packages(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_exec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_ctx *arg1 = (struct poclidek_ctx *) 0 ;
  struct poldek_ts *arg2 = (struct poldek_ts *) 0 ;
  int arg3 ;
  char **arg4 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:poclidek_exec",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_exec" "', argument " "1"" of type '" "struct poclidek_ctx *""'"); 
  }
  arg1 = (struct poclidek_ctx *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poclidek_exec" "', argument " "2"" of type '" "struct poldek_ts *""'"); 
  }
  arg2 = (struct poldek_ts *)(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "poclidek_exec" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_char, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "poclidek_exec" "', argument " "4"" of type '" "char const **""'"); 
  }
  arg4 = (char **)(argp4);
  result = (int)poclidek_exec(arg1,arg2,arg3,(char const **)arg4);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_execline(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_ctx *arg1 = (struct poclidek_ctx *) 0 ;
  struct poldek_ts *arg2 = (struct poldek_ts *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:poclidek_execline",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_execline" "', argument " "1"" of type '" "struct poclidek_ctx *""'"); 
  }
  arg1 = (struct poclidek_ctx *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poclidek_execline" "', argument " "2"" of type '" "struct poldek_ts *""'"); 
  }
  arg2 = (struct poldek_ts *)(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "poclidek_execline" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  result = (int)poclidek_execline(arg1,arg2,(char const *)arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_rcmd_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_ctx *arg1 = (struct poclidek_ctx *) 0 ;
  struct poldek_ts *arg2 = (struct poldek_ts *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct poclidek_rcmd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poclidek_rcmd_new",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_rcmd_new" "', argument " "1"" of type '" "struct poclidek_ctx *""'"); 
  }
  arg1 = (struct poclidek_ctx *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poclidek_rcmd_new" "', argument " "2"" of type '" "struct poldek_ts *""'"); 
  }
  arg2 = (struct poldek_ts *)(argp2);
  result = (struct poclidek_rcmd *)poclidek_rcmd_new(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poclidek_rcmd, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_rcmd_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_rcmd *arg1 = (struct poclidek_rcmd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poclidek_rcmd_free",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_rcmd, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_rcmd_free" "', argument " "1"" of type '" "struct poclidek_rcmd *""'"); 
  }
  arg1 = (struct poclidek_rcmd *)(argp1);
  poclidek_rcmd_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_rcmd_exec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_rcmd *arg1 = (struct poclidek_rcmd *) 0 ;
  int arg2 ;
  char **arg3 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:poclidek_rcmd_exec",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_rcmd, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_rcmd_exec" "', argument " "1"" of type '" "struct poclidek_rcmd *""'"); 
  }
  arg1 = (struct poclidek_rcmd *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poclidek_rcmd_exec" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_char, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "poclidek_rcmd_exec" "', argument " "3"" of type '" "char const **""'"); 
  }
  arg3 = (char **)(argp3);
  result = (int)poclidek_rcmd_exec(arg1,arg2,(char const **)arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_rcmd_execline(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_rcmd *arg1 = (struct poclidek_rcmd *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poclidek_rcmd_execline",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_rcmd, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_rcmd_execline" "', argument " "1"" of type '" "struct poclidek_rcmd *""'"); 
  }
  arg1 = (struct poclidek_rcmd *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poclidek_rcmd_execline" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)poclidek_rcmd_execline(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_rcmd_get_packages(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_rcmd *arg1 = (struct poclidek_rcmd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_array *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poclidek_rcmd_get_packages",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_rcmd, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_rcmd_get_packages" "', argument " "1"" of type '" "struct poclidek_rcmd *""'"); 
  }
  arg1 = (struct poclidek_rcmd *)(argp1);
  result = (tn_array *)poclidek_rcmd_get_packages(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_trurl_array_private, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_rcmd_get_buf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_rcmd *arg1 = (struct poclidek_rcmd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  tn_buf *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poclidek_rcmd_get_buf",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_rcmd, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_rcmd_get_buf" "', argument " "1"" of type '" "struct poclidek_rcmd *""'"); 
  }
  arg1 = (struct poclidek_rcmd *)(argp1);
  result = (tn_buf *)poclidek_rcmd_get_buf(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tn_buf, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_rcmd_get_output(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_rcmd *arg1 = (struct poclidek_rcmd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poclidek_rcmd_get_output",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_rcmd, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_rcmd_get_output" "', argument " "1"" of type '" "struct poclidek_rcmd *""'"); 
  }
  arg1 = (struct poclidek_rcmd *)(argp1);
  result = (char *)poclidek_rcmd_get_output(arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_poldek_ctx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_poldek_ctx")) SWIG_fail;
  result = (struct poldek_ctx *)new_poldek_ctx();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poldek_ctx, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_poldek_ctx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_poldek_ctx",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_poldek_ctx" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  delete_poldek_ctx(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_load_config(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  char *arg2 = (char *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O|O:poldek_ctx_load_config",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ctx_load_config" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poldek_ctx_load_config" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = (char *)(buf2);
  }
  result = (int)poldek_ctx_load_config(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_configure__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  int arg2 ;
  void *arg3 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:poldek_ctx_configure",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ctx_configure" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ctx_configure" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "poldek_ctx_configure" "', argument " "3"" of type '" "void *""'"); 
  }
  result = (int)poldek_ctx_configure__SWIG_0(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_configure__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  int arg2 ;
  unsigned int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:poldek_ctx_configure",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ctx_configure" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ctx_configure" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "poldek_ctx_configure" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = (unsigned int)(val3);
  result = (int)poldek_ctx_configure__SWIG_1(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_configure__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:poldek_ctx_configure",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ctx_configure" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ctx_configure" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "poldek_ctx_configure" "', argument " "3"" of type '" "char *""'");
  }
  arg3 = (char *)(buf3);
  result = (int)poldek_ctx_configure__SWIG_2(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_configure(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  int ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = (int)PyObject_Length(args);
  for (ii = 0; (ii < argc) && (ii < 3); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_poldek_ctx, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *ptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_poldek_ctx_configure__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_poldek_ctx, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_poldek_ctx_configure__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_poldek_ctx, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_poldek_ctx_configure__SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'poldek_ctx_configure'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    configure(struct poldek_ctx *,int,void *)\n"
    "    configure(struct poldek_ctx *,int,unsigned int)\n"
    "    configure(struct poldek_ctx *,int,char *)\n");
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_ts_new__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct poldek_ts *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ctx_ts_new",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ctx_ts_new" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ctx_ts_new" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (struct poldek_ts *)poldek_ctx_ts_new__SWIG_0(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poldek_ts, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_ts_new__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct poldek_ts *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poldek_ctx_ts_new",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ctx_ts_new" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (struct poldek_ts *)poldek_ctx_ts_new__SWIG_1(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poldek_ts, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_ts_new(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  int ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = (int)PyObject_Length(args);
  for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_poldek_ctx, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_poldek_ctx_ts_new__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_poldek_ctx, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_poldek_ctx_ts_new__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'poldek_ctx_ts_new'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    ts_new(struct poldek_ctx *,unsigned int)\n"
    "    ts_new(struct poldek_ctx *)\n");
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_set_verbose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ctx_set_verbose",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ctx_set_verbose" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "poldek_ctx_set_verbose" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)poldek_ctx_set_verbose(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_set_callbacks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ctx_set_callbacks",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ctx_set_callbacks" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  arg2 = obj1;
  poldek_ctx_set_callbacks(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poldek_ctx_set_vfile_progress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poldek_ctx_set_vfile_progress",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poldek_ctx_set_vfile_progress" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  arg2 = obj1;
  poldek_ctx_set_vfile_progress(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *poldek_ctx_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_poldek_ctx, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_poldek_ts__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct poldek_ts *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_poldek_ts",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_poldek_ts" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_poldek_ts" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (struct poldek_ts *)new_poldek_ts__SWIG_0(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poldek_ts, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_poldek_ts__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct poldek_ts *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_poldek_ts",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_poldek_ts" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  result = (struct poldek_ts *)new_poldek_ts__SWIG_1(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poldek_ts, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_poldek_ts(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  int ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = (int)PyObject_Length(args);
  for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_poldek_ts, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_poldek_ts__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_poldek_ctx, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_poldek_ts__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_poldek_ts'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    poldek_ts(struct poldek_ctx *,unsigned int)\n"
    "    poldek_ts(struct poldek_ts *)\n");
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_poldek_ts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ts *arg1 = (struct poldek_ts *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_poldek_ts",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ts, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_poldek_ts" "', argument " "1"" of type '" "struct poldek_ts *""'"); 
  }
  arg1 = (struct poldek_ts *)(argp1);
  delete_poldek_ts(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *poldek_ts_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_poldek_ts, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_pkguinf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  int res1 ;
  PyObject * obj0 = 0 ;
  struct pkguinf *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_pkguinf",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_pkguinf" "', argument " "1"" of type '" "void *""'"); 
  }
  result = (struct pkguinf *)new_pkguinf(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkguinf, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_pkguinf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkguinf *arg1 = (struct pkguinf *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_pkguinf",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkguinf, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pkguinf" "', argument " "1"" of type '" "struct pkguinf *""'"); 
  }
  arg1 = (struct pkguinf *)(argp1);
  delete_pkguinf(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *pkguinf_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_pkguinf, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_pkgflist_it__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist_it *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_pkgflist_it")) SWIG_fail;
  result = (struct pkgflist_it *)new_pkgflist_it__SWIG_0();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgflist_it, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_pkgflist_it__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist_it *arg1 = (struct pkgflist_it *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct pkgflist_it *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_pkgflist_it",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist_it, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_pkgflist_it" "', argument " "1"" of type '" "struct pkgflist_it *""'"); 
  }
  arg1 = (struct pkgflist_it *)(argp1);
  result = (struct pkgflist_it *)new_pkgflist_it__SWIG_1(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pkgflist_it, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_pkgflist_it(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  int ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = (int)PyObject_Length(args);
  for (ii = 0; (ii < argc) && (ii < 1); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_pkgflist_it__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_pkgflist_it, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_pkgflist_it__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_pkgflist_it'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    pkgflist_it()\n"
    "    pkgflist_it(struct pkgflist_it *)\n");
  return NULL;
}


SWIGINTERN PyObject *_wrap_pkgflist_it_get_tuple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist_it *arg1 = (struct pkgflist_it *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:pkgflist_it_get_tuple",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist_it, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pkgflist_it_get_tuple" "', argument " "1"" of type '" "struct pkgflist_it *""'"); 
  }
  arg1 = (struct pkgflist_it *)(argp1);
  result = (PyObject *)pkgflist_it_get_tuple(arg1);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_pkgflist_it__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct pkgflist_it *arg1 = (struct pkgflist_it *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_pkgflist_it",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_pkgflist_it, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pkgflist_it" "', argument " "1"" of type '" "struct pkgflist_it *""'"); 
  }
  arg1 = (struct pkgflist_it *)(argp1);
  free((char *) arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_pkgflist_it(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  int ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = (int)PyObject_Length(args);
  for (ii = 0; (ii < argc) && (ii < 1); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_pkgflist_it, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_delete_pkgflist_it__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'delete_pkgflist_it'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    ~pkgflist_it()\n"
    "    pkgflist_it::~pkgflist_it(struct pkgflist_it *)\n");
  return NULL;
}


SWIGINTERN PyObject *pkgflist_it_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_pkgflist_it, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_poclidek_ctx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poldek_ctx *arg1 = (struct poldek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct poclidek_ctx *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_poclidek_ctx",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poldek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_poclidek_ctx" "', argument " "1"" of type '" "struct poldek_ctx *""'"); 
  }
  arg1 = (struct poldek_ctx *)(argp1);
  result = (struct poclidek_ctx *)new_poclidek_ctx(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poclidek_ctx, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_ctx_pwd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_ctx *arg1 = (struct poclidek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poclidek_ctx_pwd",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_ctx_pwd" "', argument " "1"" of type '" "struct poclidek_ctx *""'"); 
  }
  arg1 = (struct poclidek_ctx *)(argp1);
  result = (char *)poclidek_ctx_pwd(arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_ctx_chdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_ctx *arg1 = (struct poclidek_ctx *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poclidek_ctx_chdir",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_ctx_chdir" "', argument " "1"" of type '" "struct poclidek_ctx *""'"); 
  }
  arg1 = (struct poclidek_ctx *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poclidek_ctx_chdir" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)poclidek_ctx_chdir(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_poclidek_ctx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_ctx *arg1 = (struct poclidek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_poclidek_ctx",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_ctx, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_poclidek_ctx" "', argument " "1"" of type '" "struct poclidek_ctx *""'"); 
  }
  arg1 = (struct poclidek_ctx *)(argp1);
  delete_poclidek_ctx(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *poclidek_ctx_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_poclidek_ctx, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_poclidek_rcmd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_ctx *arg1 = (struct poclidek_ctx *) 0 ;
  struct poldek_ts *arg2 = (struct poldek_ts *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  struct poclidek_rcmd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:new_poclidek_rcmd",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_poclidek_rcmd" "', argument " "1"" of type '" "struct poclidek_ctx *""'"); 
  }
  arg1 = (struct poclidek_ctx *)(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_poldek_ts, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_poclidek_rcmd" "', argument " "2"" of type '" "struct poldek_ts *""'"); 
  }
  arg2 = (struct poldek_ts *)(argp2);
  result = (struct poclidek_rcmd *)new_poclidek_rcmd__SWIG_0(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poclidek_rcmd, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_poclidek_rcmd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_ctx *arg1 = (struct poclidek_ctx *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  struct poclidek_rcmd *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:new_poclidek_rcmd",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_ctx, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_poclidek_rcmd" "', argument " "1"" of type '" "struct poclidek_ctx *""'"); 
  }
  arg1 = (struct poclidek_ctx *)(argp1);
  result = (struct poclidek_rcmd *)new_poclidek_rcmd__SWIG_1(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poclidek_rcmd, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_poclidek_rcmd(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  int ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = (int)PyObject_Length(args);
  for (ii = 0; (ii < argc) && (ii < 2); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_poclidek_ctx, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_poclidek_rcmd__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_poclidek_ctx, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_poldek_ts, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_poclidek_rcmd__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_poclidek_rcmd'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    poclidek_rcmd(struct poclidek_ctx *,struct poldek_ts *)\n"
    "    poclidek_rcmd(struct poclidek_ctx *)\n");
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_rcmd_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_rcmd *arg1 = (struct poclidek_rcmd *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:poclidek_rcmd_execute",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_rcmd, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_rcmd_execute" "', argument " "1"" of type '" "struct poclidek_rcmd *""'"); 
  }
  arg1 = (struct poclidek_rcmd *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "poclidek_rcmd_execute" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)poclidek_rcmd_execute(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_poclidek_rcmd_to_s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_rcmd *arg1 = (struct poclidek_rcmd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:poclidek_rcmd_to_s",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_rcmd, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "poclidek_rcmd_to_s" "', argument " "1"" of type '" "struct poclidek_rcmd *""'"); 
  }
  arg1 = (struct poclidek_rcmd *)(argp1);
  result = (char *)poclidek_rcmd_to_s(arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_poclidek_rcmd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct poclidek_rcmd *arg1 = (struct poclidek_rcmd *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_poclidek_rcmd",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_poclidek_rcmd, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_poclidek_rcmd" "', argument " "1"" of type '" "struct poclidek_rcmd *""'"); 
  }
  arg1 = (struct poclidek_rcmd *)(argp1);
  delete_poclidek_rcmd(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *poclidek_rcmd_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_poclidek_rcmd, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

static PyMethodDef SwigMethods[] = {
	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
	 { (char *)"new_tn_array", _wrap_new_tn_array, METH_VARARGS, NULL},
	 { (char *)"delete_tn_array", _wrap_delete_tn_array, METH_VARARGS, NULL},
	 { (char *)"tn_array___len__", _wrap_tn_array___len__, METH_VARARGS, NULL},
	 { (char *)"tn_array_nth", _wrap_tn_array_nth, METH_VARARGS, NULL},
	 { (char *)"tn_array_swigregister", tn_array_swigregister, METH_VARARGS, NULL},
	 { (char *)"n_array_new_ex", _wrap_n_array_new_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_new_na", _wrap_n_array_new_na, METH_VARARGS, NULL},
	 { (char *)"n_array_init_ex", _wrap_n_array_init_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_ctl_set_freefn", _wrap_n_array_ctl_set_freefn, METH_VARARGS, NULL},
	 { (char *)"n_array_ctl_set_cmpfn", _wrap_n_array_ctl_set_cmpfn, METH_VARARGS, NULL},
	 { (char *)"n_array_ctl_get_cmpfn", _wrap_n_array_ctl_get_cmpfn, METH_VARARGS, NULL},
	 { (char *)"n_array_free", _wrap_n_array_free, METH_VARARGS, NULL},
	 { (char *)"n_array_cfree", _wrap_n_array_cfree, METH_VARARGS, NULL},
	 { (char *)"n_array_free_na", _wrap_n_array_free_na, METH_VARARGS, NULL},
	 { (char *)"n_array_clean", _wrap_n_array_clean, METH_VARARGS, NULL},
	 { (char *)"n_array_clone_ex", _wrap_n_array_clone_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_clone", _wrap_n_array_clone, METH_VARARGS, NULL},
	 { (char *)"n_array_dup", _wrap_n_array_dup, METH_VARARGS, NULL},
	 { (char *)"n_array_size", _wrap_n_array_size, METH_VARARGS, NULL},
	 { (char *)"n_array_nth", _wrap_n_array_nth, METH_VARARGS, NULL},
	 { (char *)"n_array_set_nth", _wrap_n_array_set_nth, METH_VARARGS, NULL},
	 { (char *)"n_array_remove_nth", _wrap_n_array_remove_nth, METH_VARARGS, NULL},
	 { (char *)"n_array_push", _wrap_n_array_push, METH_VARARGS, NULL},
	 { (char *)"n_array_concat_ex", _wrap_n_array_concat_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_grow_priv_", _wrap_n_array_grow_priv_, METH_VARARGS, NULL},
	 { (char *)"n_array_pop", _wrap_n_array_pop, METH_VARARGS, NULL},
	 { (char *)"n_array_shift", _wrap_n_array_shift, METH_VARARGS, NULL},
	 { (char *)"n_array_unshift", _wrap_n_array_unshift, METH_VARARGS, NULL},
	 { (char *)"n_array_eq_ex", _wrap_n_array_eq_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_reverse", _wrap_n_array_reverse, METH_VARARGS, NULL},
	 { (char *)"n_array_uniq_ex", _wrap_n_array_uniq_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_sort_ex", _wrap_n_array_sort_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_qsort_ex", _wrap_n_array_qsort_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_isort_ex", _wrap_n_array_isort_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_bsearch_ex", _wrap_n_array_bsearch_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_bsearch_idx_ex", _wrap_n_array_bsearch_idx_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_remove_ex", _wrap_n_array_remove_ex, METH_VARARGS, NULL},
	 { (char *)"n_array_map", _wrap_n_array_map, METH_VARARGS, NULL},
	 { (char *)"n_array_map_arg", _wrap_n_array_map_arg, METH_VARARGS, NULL},
	 { (char *)"n_array_dump_stats", _wrap_n_array_dump_stats, METH_VARARGS, NULL},
	 { (char *)"capreq_cr_flags_set", _wrap_capreq_cr_flags_set, METH_VARARGS, NULL},
	 { (char *)"capreq_cr_flags_get", _wrap_capreq_cr_flags_get, METH_VARARGS, NULL},
	 { (char *)"capreq_cr_relflags_set", _wrap_capreq_cr_relflags_set, METH_VARARGS, NULL},
	 { (char *)"capreq_cr_relflags_get", _wrap_capreq_cr_relflags_get, METH_VARARGS, NULL},
	 { (char *)"capreq_name_set", _wrap_capreq_name_set, METH_VARARGS, NULL},
	 { (char *)"capreq_name_get", _wrap_capreq_name_get, METH_VARARGS, NULL},
	 { (char *)"capreq_cr_ep_ofs_set", _wrap_capreq_cr_ep_ofs_set, METH_VARARGS, NULL},
	 { (char *)"capreq_cr_ep_ofs_get", _wrap_capreq_cr_ep_ofs_get, METH_VARARGS, NULL},
	 { (char *)"capreq_cr_ver_ofs_set", _wrap_capreq_cr_ver_ofs_set, METH_VARARGS, NULL},
	 { (char *)"capreq_cr_ver_ofs_get", _wrap_capreq_cr_ver_ofs_get, METH_VARARGS, NULL},
	 { (char *)"capreq_cr_rel_ofs_set", _wrap_capreq_cr_rel_ofs_set, METH_VARARGS, NULL},
	 { (char *)"capreq_cr_rel_ofs_get", _wrap_capreq_cr_rel_ofs_get, METH_VARARGS, NULL},
	 { (char *)"capreq__buff_set", _wrap_capreq__buff_set, METH_VARARGS, NULL},
	 { (char *)"capreq__buff_get", _wrap_capreq__buff_get, METH_VARARGS, NULL},
	 { (char *)"new_capreq", _wrap_new_capreq, METH_VARARGS, NULL},
	 { (char *)"capreq_get_name", _wrap_capreq_get_name, METH_VARARGS, NULL},
	 { (char *)"capreq_get_epoch", _wrap_capreq_get_epoch, METH_VARARGS, NULL},
	 { (char *)"capreq_get_ver", _wrap_capreq_get_ver, METH_VARARGS, NULL},
	 { (char *)"capreq_get_rel", _wrap_capreq_get_rel, METH_VARARGS, NULL},
	 { (char *)"capreq_is_versioned", _wrap_capreq_is_versioned, METH_VARARGS, NULL},
	 { (char *)"capreq__is_cnfl", _wrap_capreq__is_cnfl, METH_VARARGS, NULL},
	 { (char *)"capreq__is_prereq", _wrap_capreq__is_prereq, METH_VARARGS, NULL},
	 { (char *)"capreq__is_prereq_un", _wrap_capreq__is_prereq_un, METH_VARARGS, NULL},
	 { (char *)"capreq__is_file", _wrap_capreq__is_file, METH_VARARGS, NULL},
	 { (char *)"capreq__is_bastard", _wrap_capreq__is_bastard, METH_VARARGS, NULL},
	 { (char *)"capreq__is_autodirreq", _wrap_capreq__is_autodirreq, METH_VARARGS, NULL},
	 { (char *)"capreq__is_obsl", _wrap_capreq__is_obsl, METH_VARARGS, NULL},
	 { (char *)"capreq__is_rpmlib", _wrap_capreq__is_rpmlib, METH_VARARGS, NULL},
	 { (char *)"delete_capreq", _wrap_delete_capreq, METH_VARARGS, NULL},
	 { (char *)"capreq_swigregister", capreq_swigregister, METH_VARARGS, NULL},
	 { (char *)"capreq_epoch_", _wrap_capreq_epoch_, METH_VARARGS, NULL},
	 { (char *)"capreq_new_evr", _wrap_capreq_new_evr, METH_VARARGS, NULL},
	 { (char *)"capreq_new", _wrap_capreq_new, METH_VARARGS, NULL},
	 { (char *)"capreq_free_na", _wrap_capreq_free_na, METH_VARARGS, NULL},
	 { (char *)"capreq_free", _wrap_capreq_free, METH_VARARGS, NULL},
	 { (char *)"capreq_clone", _wrap_capreq_clone, METH_VARARGS, NULL},
	 { (char *)"capreq_strcmp_evr", _wrap_capreq_strcmp_evr, METH_VARARGS, NULL},
	 { (char *)"capreq_strcmp_name_evr", _wrap_capreq_strcmp_name_evr, METH_VARARGS, NULL},
	 { (char *)"capreq_cmp_name", _wrap_capreq_cmp_name, METH_VARARGS, NULL},
	 { (char *)"capreq_cmp_name_evr", _wrap_capreq_cmp_name_evr, METH_VARARGS, NULL},
	 { (char *)"capreq_snprintf", _wrap_capreq_snprintf, METH_VARARGS, NULL},
	 { (char *)"capreq_snprintf_s", _wrap_capreq_snprintf_s, METH_VARARGS, NULL},
	 { (char *)"capreq_snprintf_s0", _wrap_capreq_snprintf_s0, METH_VARARGS, NULL},
	 { (char *)"capreq_str", _wrap_capreq_str, METH_VARARGS, NULL},
	 { (char *)"pkg_flags_set", _wrap_pkg_flags_set, METH_VARARGS, NULL},
	 { (char *)"pkg_flags_get", _wrap_pkg_flags_get, METH_VARARGS, NULL},
	 { (char *)"pkg_size_set", _wrap_pkg_size_set, METH_VARARGS, NULL},
	 { (char *)"pkg_size_get", _wrap_pkg_size_get, METH_VARARGS, NULL},
	 { (char *)"pkg_fsize_set", _wrap_pkg_fsize_set, METH_VARARGS, NULL},
	 { (char *)"pkg_fsize_get", _wrap_pkg_fsize_get, METH_VARARGS, NULL},
	 { (char *)"pkg_btime_set", _wrap_pkg_btime_set, METH_VARARGS, NULL},
	 { (char *)"pkg_btime_get", _wrap_pkg_btime_get, METH_VARARGS, NULL},
	 { (char *)"pkg_color_set", _wrap_pkg_color_set, METH_VARARGS, NULL},
	 { (char *)"pkg_color_get", _wrap_pkg_color_get, METH_VARARGS, NULL},
	 { (char *)"pkg_name_set", _wrap_pkg_name_set, METH_VARARGS, NULL},
	 { (char *)"pkg_name_get", _wrap_pkg_name_get, METH_VARARGS, NULL},
	 { (char *)"pkg_epoch_set", _wrap_pkg_epoch_set, METH_VARARGS, NULL},
	 { (char *)"pkg_epoch_get", _wrap_pkg_epoch_get, METH_VARARGS, NULL},
	 { (char *)"pkg_ver_set", _wrap_pkg_ver_set, METH_VARARGS, NULL},
	 { (char *)"pkg_ver_get", _wrap_pkg_ver_get, METH_VARARGS, NULL},
	 { (char *)"pkg_rel_set", _wrap_pkg_rel_set, METH_VARARGS, NULL},
	 { (char *)"pkg_rel_get", _wrap_pkg_rel_get, METH_VARARGS, NULL},
	 { (char *)"pkg_fn_set", _wrap_pkg_fn_set, METH_VARARGS, NULL},
	 { (char *)"pkg_fn_get", _wrap_pkg_fn_get, METH_VARARGS, NULL},
	 { (char *)"pkg_srcfn_set", _wrap_pkg_srcfn_set, METH_VARARGS, NULL},
	 { (char *)"pkg_srcfn_get", _wrap_pkg_srcfn_get, METH_VARARGS, NULL},
	 { (char *)"pkg_fmtime_set", _wrap_pkg_fmtime_set, METH_VARARGS, NULL},
	 { (char *)"pkg_fmtime_get", _wrap_pkg_fmtime_get, METH_VARARGS, NULL},
	 { (char *)"pkg__nvr_set", _wrap_pkg__nvr_set, METH_VARARGS, NULL},
	 { (char *)"pkg__nvr_get", _wrap_pkg__nvr_get, METH_VARARGS, NULL},
	 { (char *)"pkg__arch_set", _wrap_pkg__arch_set, METH_VARARGS, NULL},
	 { (char *)"pkg__arch_get", _wrap_pkg__arch_get, METH_VARARGS, NULL},
	 { (char *)"pkg__os_set", _wrap_pkg__os_set, METH_VARARGS, NULL},
	 { (char *)"pkg__os_get", _wrap_pkg__os_get, METH_VARARGS, NULL},
	 { (char *)"pkg_caps_set", _wrap_pkg_caps_set, METH_VARARGS, NULL},
	 { (char *)"pkg_caps_get", _wrap_pkg_caps_get, METH_VARARGS, NULL},
	 { (char *)"pkg_reqs_set", _wrap_pkg_reqs_set, METH_VARARGS, NULL},
	 { (char *)"pkg_reqs_get", _wrap_pkg_reqs_get, METH_VARARGS, NULL},
	 { (char *)"pkg_cnfls_set", _wrap_pkg_cnfls_set, METH_VARARGS, NULL},
	 { (char *)"pkg_cnfls_get", _wrap_pkg_cnfls_get, METH_VARARGS, NULL},
	 { (char *)"pkg_sugs_set", _wrap_pkg_sugs_set, METH_VARARGS, NULL},
	 { (char *)"pkg_sugs_get", _wrap_pkg_sugs_get, METH_VARARGS, NULL},
	 { (char *)"pkg_fl_set", _wrap_pkg_fl_set, METH_VARARGS, NULL},
	 { (char *)"pkg_fl_get", _wrap_pkg_fl_get, METH_VARARGS, NULL},
	 { (char *)"pkg_reqpkgs_set", _wrap_pkg_reqpkgs_set, METH_VARARGS, NULL},
	 { (char *)"pkg_reqpkgs_get", _wrap_pkg_reqpkgs_get, METH_VARARGS, NULL},
	 { (char *)"pkg_revreqpkgs_set", _wrap_pkg_revreqpkgs_set, METH_VARARGS, NULL},
	 { (char *)"pkg_revreqpkgs_get", _wrap_pkg_revreqpkgs_get, METH_VARARGS, NULL},
	 { (char *)"pkg_cnflpkgs_set", _wrap_pkg_cnflpkgs_set, METH_VARARGS, NULL},
	 { (char *)"pkg_cnflpkgs_get", _wrap_pkg_cnflpkgs_get, METH_VARARGS, NULL},
	 { (char *)"pkg_pkgdir_set", _wrap_pkg_pkgdir_set, METH_VARARGS, NULL},
	 { (char *)"pkg_pkgdir_get", _wrap_pkg_pkgdir_get, METH_VARARGS, NULL},
	 { (char *)"pkg_pkgdir_data_set", _wrap_pkg_pkgdir_data_set, METH_VARARGS, NULL},
	 { (char *)"pkg_pkgdir_data_get", _wrap_pkg_pkgdir_data_get, METH_VARARGS, NULL},
	 { (char *)"pkg_pkgdir_data_free_set", _wrap_pkg_pkgdir_data_free_set, METH_VARARGS, NULL},
	 { (char *)"pkg_pkgdir_data_free_get", _wrap_pkg_pkgdir_data_free_get, METH_VARARGS, NULL},
	 { (char *)"pkg_load_pkguinf_set", _wrap_pkg_load_pkguinf_set, METH_VARARGS, NULL},
	 { (char *)"pkg_load_pkguinf_get", _wrap_pkg_load_pkguinf_get, METH_VARARGS, NULL},
	 { (char *)"pkg_load_nodep_fl_set", _wrap_pkg_load_nodep_fl_set, METH_VARARGS, NULL},
	 { (char *)"pkg_load_nodep_fl_get", _wrap_pkg_load_nodep_fl_get, METH_VARARGS, NULL},
	 { (char *)"pkg_pkg_pkguinf_set", _wrap_pkg_pkg_pkguinf_set, METH_VARARGS, NULL},
	 { (char *)"pkg_pkg_pkguinf_get", _wrap_pkg_pkg_pkguinf_get, METH_VARARGS, NULL},
	 { (char *)"pkg_pri_set", _wrap_pkg_pri_set, METH_VARARGS, NULL},
	 { (char *)"pkg_pri_get", _wrap_pkg_pri_get, METH_VARARGS, NULL},
	 { (char *)"pkg_groupid_set", _wrap_pkg_groupid_set, METH_VARARGS, NULL},
	 { (char *)"pkg_groupid_get", _wrap_pkg_groupid_get, METH_VARARGS, NULL},
	 { (char *)"pkg_recno_set", _wrap_pkg_recno_set, METH_VARARGS, NULL},
	 { (char *)"pkg_recno_get", _wrap_pkg_recno_get, METH_VARARGS, NULL},
	 { (char *)"pkg_itime_set", _wrap_pkg_itime_set, METH_VARARGS, NULL},
	 { (char *)"pkg_itime_get", _wrap_pkg_itime_get, METH_VARARGS, NULL},
	 { (char *)"pkg__refcnt_set", _wrap_pkg__refcnt_set, METH_VARARGS, NULL},
	 { (char *)"pkg__refcnt_get", _wrap_pkg__refcnt_get, METH_VARARGS, NULL},
	 { (char *)"pkg_na_set", _wrap_pkg_na_set, METH_VARARGS, NULL},
	 { (char *)"pkg_na_get", _wrap_pkg_na_get, METH_VARARGS, NULL},
	 { (char *)"pkg__buf_size_set", _wrap_pkg__buf_size_set, METH_VARARGS, NULL},
	 { (char *)"pkg__buf_size_get", _wrap_pkg__buf_size_get, METH_VARARGS, NULL},
	 { (char *)"pkg__buf_set", _wrap_pkg__buf_set, METH_VARARGS, NULL},
	 { (char *)"pkg__buf_get", _wrap_pkg__buf_get, METH_VARARGS, NULL},
	 { (char *)"new_pkg", _wrap_new_pkg, METH_VARARGS, NULL},
	 { (char *)"pkg__get_provides", _wrap_pkg__get_provides, METH_VARARGS, NULL},
	 { (char *)"pkg__get_requires", _wrap_pkg__get_requires, METH_VARARGS, NULL},
	 { (char *)"pkg__get_conflicts", _wrap_pkg__get_conflicts, METH_VARARGS, NULL},
	 { (char *)"pkg__get_suggests", _wrap_pkg__get_suggests, METH_VARARGS, NULL},
	 { (char *)"delete_pkg", _wrap_delete_pkg, METH_VARARGS, NULL},
	 { (char *)"pkg_swigregister", pkg_swigregister, METH_VARARGS, NULL},
	 { (char *)"pkg_new_ext", _wrap_pkg_new_ext, METH_VARARGS, NULL},
	 { (char *)"pkg_free", _wrap_pkg_free, METH_VARARGS, NULL},
	 { (char *)"pkg_link", _wrap_pkg_link, METH_VARARGS, NULL},
	 { (char *)"pkg_set_arch", _wrap_pkg_set_arch, METH_VARARGS, NULL},
	 { (char *)"pkg_arch", _wrap_pkg_arch, METH_VARARGS, NULL},
	 { (char *)"pkg_arch_score", _wrap_pkg_arch_score, METH_VARARGS, NULL},
	 { (char *)"pkg_os", _wrap_pkg_os, METH_VARARGS, NULL},
	 { (char *)"pkg_set_os", _wrap_pkg_set_os, METH_VARARGS, NULL},
	 { (char *)"pkg_caps_match_req", _wrap_pkg_caps_match_req, METH_VARARGS, NULL},
	 { (char *)"pkg_evr_match_req", _wrap_pkg_evr_match_req, METH_VARARGS, NULL},
	 { (char *)"cap_xmatch_req", _wrap_cap_xmatch_req, METH_VARARGS, NULL},
	 { (char *)"cap_match_req", _wrap_cap_match_req, METH_VARARGS, NULL},
	 { (char *)"pkg_xmatch_req", _wrap_pkg_xmatch_req, METH_VARARGS, NULL},
	 { (char *)"pkg_match_req", _wrap_pkg_match_req, METH_VARARGS, NULL},
	 { (char *)"pkg_has_path", _wrap_pkg_has_path, METH_VARARGS, NULL},
	 { (char *)"pkg_satisfies_req", _wrap_pkg_satisfies_req, METH_VARARGS, NULL},
	 { (char *)"pkg_obsoletes_pkg", _wrap_pkg_obsoletes_pkg, METH_VARARGS, NULL},
	 { (char *)"pkg_caps_obsoletes_pkg_caps", _wrap_pkg_caps_obsoletes_pkg_caps, METH_VARARGS, NULL},
	 { (char *)"pkg_requires_cap", _wrap_pkg_requires_cap, METH_VARARGS, NULL},
	 { (char *)"pkg_add_pkgcnfl", _wrap_pkg_add_pkgcnfl, METH_VARARGS, NULL},
	 { (char *)"pkg_has_pkgcnfl", _wrap_pkg_has_pkgcnfl, METH_VARARGS, NULL},
	 { (char *)"pkg_srcfilename", _wrap_pkg_srcfilename, METH_VARARGS, NULL},
	 { (char *)"pkg_srcfilename_s", _wrap_pkg_srcfilename_s, METH_VARARGS, NULL},
	 { (char *)"pkg_filename", _wrap_pkg_filename, METH_VARARGS, NULL},
	 { (char *)"pkg_filename_s", _wrap_pkg_filename_s, METH_VARARGS, NULL},
	 { (char *)"pkg_path", _wrap_pkg_path, METH_VARARGS, NULL},
	 { (char *)"pkg_path_s", _wrap_pkg_path_s, METH_VARARGS, NULL},
	 { (char *)"pkg_localpath", _wrap_pkg_localpath, METH_VARARGS, NULL},
	 { (char *)"pkg_pkgdirpath", _wrap_pkg_pkgdirpath, METH_VARARGS, NULL},
	 { (char *)"pkg_file_url_type", _wrap_pkg_file_url_type, METH_VARARGS, NULL},
	 { (char *)"pkg_id", _wrap_pkg_id, METH_VARARGS, NULL},
	 { (char *)"pkg_id_snprintf", _wrap_pkg_id_snprintf, METH_VARARGS, NULL},
	 { (char *)"pkg_idevr_snprintf", _wrap_pkg_idevr_snprintf, METH_VARARGS, NULL},
	 { (char *)"pkg_printf", _wrap_pkg_printf, METH_VARARGS, NULL},
	 { (char *)"pkg_snprintf", _wrap_pkg_snprintf, METH_VARARGS, NULL},
	 { (char *)"pkg_snprintf_s", _wrap_pkg_snprintf_s, METH_VARARGS, NULL},
	 { (char *)"pkg_snprintf_s0", _wrap_pkg_snprintf_s0, METH_VARARGS, NULL},
	 { (char *)"pkg_snprintf_s1", _wrap_pkg_snprintf_s1, METH_VARARGS, NULL},
	 { (char *)"pkg_evr_snprintf", _wrap_pkg_evr_snprintf, METH_VARARGS, NULL},
	 { (char *)"pkg_evr_snprintf_s", _wrap_pkg_evr_snprintf_s, METH_VARARGS, NULL},
	 { (char *)"pkg_uinf", _wrap_pkg_uinf, METH_VARARGS, NULL},
	 { (char *)"pkg_xuinf", _wrap_pkg_xuinf, METH_VARARGS, NULL},
	 { (char *)"pkg_required_dirs", _wrap_pkg_required_dirs, METH_VARARGS, NULL},
	 { (char *)"pkgflist_fl_set", _wrap_pkgflist_fl_set, METH_VARARGS, NULL},
	 { (char *)"pkgflist_fl_get", _wrap_pkgflist_fl_get, METH_VARARGS, NULL},
	 { (char *)"pkgflist__na_set", _wrap_pkgflist__na_set, METH_VARARGS, NULL},
	 { (char *)"pkgflist__na_get", _wrap_pkgflist__na_get, METH_VARARGS, NULL},
	 { (char *)"new_pkgflist", _wrap_new_pkgflist, METH_VARARGS, NULL},
	 { (char *)"delete_pkgflist", _wrap_delete_pkgflist, METH_VARARGS, NULL},
	 { (char *)"pkgflist_swigregister", pkgflist_swigregister, METH_VARARGS, NULL},
	 { (char *)"pkg_get_nodep_flist", _wrap_pkg_get_nodep_flist, METH_VARARGS, NULL},
	 { (char *)"pkg_get_flist", _wrap_pkg_get_flist, METH_VARARGS, NULL},
	 { (char *)"pkgflist_free", _wrap_pkgflist_free, METH_VARARGS, NULL},
	 { (char *)"pkg_get_flist_it", _wrap_pkg_get_flist_it, METH_VARARGS, NULL},
	 { (char *)"pkgflist_it_get", _wrap_pkgflist_it_get, METH_VARARGS, NULL},
	 { (char *)"pkgflist_it_get_rawargs", _wrap_pkgflist_it_get_rawargs, METH_VARARGS, NULL},
	 { (char *)"pkgflist_it_free", _wrap_pkgflist_it_free, METH_VARARGS, NULL},
	 { (char *)"pkg_group", _wrap_pkg_group, METH_VARARGS, NULL},
	 { (char *)"pkg_strsize", _wrap_pkg_strsize, METH_VARARGS, NULL},
	 { (char *)"pkg_strbtime", _wrap_pkg_strbtime, METH_VARARGS, NULL},
	 { (char *)"pkg_stritime", _wrap_pkg_stritime, METH_VARARGS, NULL},
	 { (char *)"pkg_add_selfcap", _wrap_pkg_add_selfcap, METH_VARARGS, NULL},
	 { (char *)"pkguinf_new", _wrap_pkguinf_new, METH_VARARGS, NULL},
	 { (char *)"pkguinf_link", _wrap_pkguinf_link, METH_VARARGS, NULL},
	 { (char *)"pkguinf_free", _wrap_pkguinf_free, METH_VARARGS, NULL},
	 { (char *)"pkguinf_get", _wrap_pkguinf_get, METH_VARARGS, NULL},
	 { (char *)"pkguinf_set", _wrap_pkguinf_set, METH_VARARGS, NULL},
	 { (char *)"pkguinf_get_changelog", _wrap_pkguinf_get_changelog, METH_VARARGS, NULL},
	 { (char *)"pkguinf_changelog_with_security_fixes", _wrap_pkguinf_changelog_with_security_fixes, METH_VARARGS, NULL},
	 { (char *)"pkguinf_langs", _wrap_pkguinf_langs, METH_VARARGS, NULL},
	 { (char *)"poldeklib_init", _wrap_poldeklib_init, METH_VARARGS, NULL},
	 { (char *)"poldeklib_destroy", _wrap_poldeklib_destroy, METH_VARARGS, NULL},
	 { (char *)"poldek_new", _wrap_poldek_new, METH_VARARGS, NULL},
	 { (char *)"poldek_free", _wrap_poldek_free, METH_VARARGS, NULL},
	 { (char *)"poldek_link", _wrap_poldek_link, METH_VARARGS, NULL},
	 { (char *)"poldek_configure", _wrap_poldek_configure, METH_VARARGS, NULL},
	 { (char *)"poldek_load_config", _wrap_poldek_load_config, METH_VARARGS, NULL},
	 { (char *)"poldek_setup_cachedir", _wrap_poldek_setup_cachedir, METH_VARARGS, NULL},
	 { (char *)"poldek_setup", _wrap_poldek_setup, METH_VARARGS, NULL},
	 { (char *)"poldek_load_sources", _wrap_poldek_load_sources, METH_VARARGS, NULL},
	 { (char *)"poldek_is_interactive_on", _wrap_poldek_is_interactive_on, METH_VARARGS, NULL},
	 { (char *)"poldek_get_sources", _wrap_poldek_get_sources, METH_VARARGS, NULL},
	 { (char *)"poldek_get_pkgdirs", _wrap_poldek_get_pkgdirs, METH_VARARGS, NULL},
	 { (char *)"poldek_get_pmctx", _wrap_poldek_get_pmctx, METH_VARARGS, NULL},
	 { (char *)"poldek_get_config", _wrap_poldek_get_config, METH_VARARGS, NULL},
	 { (char *)"poldek_search_avail_packages", _wrap_poldek_search_avail_packages, METH_VARARGS, NULL},
	 { (char *)"poldek_get_avail_packages", _wrap_poldek_get_avail_packages, METH_VARARGS, NULL},
	 { (char *)"poldek_load_destination_pkgdir", _wrap_poldek_load_destination_pkgdir, METH_VARARGS, NULL},
	 { (char *)"poldek_split", _wrap_poldek_split, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_new", _wrap_poldek_ts_new, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_free", _wrap_poldek_ts_free, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_get_type", _wrap_poldek_ts_get_type, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_set_type", _wrap_poldek_ts_set_type, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_setf", _wrap_poldek_ts_setf, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_clrf", _wrap_poldek_ts_clrf, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_issetf", _wrap_poldek_ts_issetf, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_issetf_all", _wrap_poldek_ts_issetf_all, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_setop", _wrap_poldek_ts_setop, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_getop", _wrap_poldek_ts_getop, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_op_touched", _wrap_poldek_ts_op_touched, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_is_interactive_on", _wrap_poldek_ts_is_interactive_on, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_configure", _wrap_poldek_ts_configure, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_add_pkg", _wrap_poldek_ts_add_pkg, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_add_pkgmask", _wrap_poldek_ts_add_pkgmask, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_add_pkgfile", _wrap_poldek_ts_add_pkgfile, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_add_pkglist", _wrap_poldek_ts_add_pkglist, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_clean_args", _wrap_poldek_ts_clean_args, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_get_args_asmasks", _wrap_poldek_ts_get_args_asmasks, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_get_arg_count", _wrap_poldek_ts_get_arg_count, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_run", _wrap_poldek_ts_run, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_get_summary", _wrap_poldek_ts_get_summary, METH_VARARGS, NULL},
	 { (char *)"source_flags_set", _wrap_source_flags_set, METH_VARARGS, NULL},
	 { (char *)"source_flags_get", _wrap_source_flags_get, METH_VARARGS, NULL},
	 { (char *)"source_type_set", _wrap_source_type_set, METH_VARARGS, NULL},
	 { (char *)"source_type_get", _wrap_source_type_get, METH_VARARGS, NULL},
	 { (char *)"source_name_set", _wrap_source_name_set, METH_VARARGS, NULL},
	 { (char *)"source_name_get", _wrap_source_name_get, METH_VARARGS, NULL},
	 { (char *)"source_path_set", _wrap_source_path_set, METH_VARARGS, NULL},
	 { (char *)"source_path_get", _wrap_source_path_get, METH_VARARGS, NULL},
	 { (char *)"source_pkg_prefix_set", _wrap_source_pkg_prefix_set, METH_VARARGS, NULL},
	 { (char *)"source_pkg_prefix_get", _wrap_source_pkg_prefix_get, METH_VARARGS, NULL},
	 { (char *)"source_compress_set", _wrap_source_compress_set, METH_VARARGS, NULL},
	 { (char *)"source_compress_get", _wrap_source_compress_get, METH_VARARGS, NULL},
	 { (char *)"source_pri_set", _wrap_source_pri_set, METH_VARARGS, NULL},
	 { (char *)"source_pri_get", _wrap_source_pri_get, METH_VARARGS, NULL},
	 { (char *)"source_no_set", _wrap_source_no_set, METH_VARARGS, NULL},
	 { (char *)"source_no_get", _wrap_source_no_get, METH_VARARGS, NULL},
	 { (char *)"source_dscr_set", _wrap_source_dscr_set, METH_VARARGS, NULL},
	 { (char *)"source_dscr_get", _wrap_source_dscr_get, METH_VARARGS, NULL},
	 { (char *)"source_lc_lang_set", _wrap_source_lc_lang_set, METH_VARARGS, NULL},
	 { (char *)"source_lc_lang_get", _wrap_source_lc_lang_get, METH_VARARGS, NULL},
	 { (char *)"source_exclude_path_set", _wrap_source_exclude_path_set, METH_VARARGS, NULL},
	 { (char *)"source_exclude_path_get", _wrap_source_exclude_path_get, METH_VARARGS, NULL},
	 { (char *)"source_ign_patterns_set", _wrap_source_ign_patterns_set, METH_VARARGS, NULL},
	 { (char *)"source_ign_patterns_get", _wrap_source_ign_patterns_get, METH_VARARGS, NULL},
	 { (char *)"source_original_type_set", _wrap_source_original_type_set, METH_VARARGS, NULL},
	 { (char *)"source_original_type_get", _wrap_source_original_type_get, METH_VARARGS, NULL},
	 { (char *)"source_subopt_flags_set", _wrap_source_subopt_flags_set, METH_VARARGS, NULL},
	 { (char *)"source_subopt_flags_get", _wrap_source_subopt_flags_get, METH_VARARGS, NULL},
	 { (char *)"source__refcnt_set", _wrap_source__refcnt_set, METH_VARARGS, NULL},
	 { (char *)"source__refcnt_get", _wrap_source__refcnt_get, METH_VARARGS, NULL},
	 { (char *)"new_source", _wrap_new_source, METH_VARARGS, NULL},
	 { (char *)"source___str__", _wrap_source___str__, METH_VARARGS, NULL},
	 { (char *)"source_get_enabled", _wrap_source_get_enabled, METH_VARARGS, NULL},
	 { (char *)"source_set_enabled", _wrap_source_set_enabled, METH_VARARGS, NULL},
	 { (char *)"delete_source", _wrap_delete_source, METH_VARARGS, NULL},
	 { (char *)"source_swigregister", source_swigregister, METH_VARARGS, NULL},
	 { (char *)"source_malloc", _wrap_source_malloc, METH_VARARGS, NULL},
	 { (char *)"source_new", _wrap_source_new, METH_VARARGS, NULL},
	 { (char *)"source_new_pathspec", _wrap_source_new_pathspec, METH_VARARGS, NULL},
	 { (char *)"source_new_htcnf", _wrap_source_new_htcnf, METH_VARARGS, NULL},
	 { (char *)"source_free", _wrap_source_free, METH_VARARGS, NULL},
	 { (char *)"source_link", _wrap_source_link, METH_VARARGS, NULL},
	 { (char *)"source_set_pkg_prefix", _wrap_source_set_pkg_prefix, METH_VARARGS, NULL},
	 { (char *)"source_set_type", _wrap_source_set_type, METH_VARARGS, NULL},
	 { (char *)"source_set_default_type", _wrap_source_set_default_type, METH_VARARGS, NULL},
	 { (char *)"source_cmp", _wrap_source_cmp, METH_VARARGS, NULL},
	 { (char *)"source_cmp_uniq", _wrap_source_cmp_uniq, METH_VARARGS, NULL},
	 { (char *)"source_cmp_name", _wrap_source_cmp_name, METH_VARARGS, NULL},
	 { (char *)"source_cmp_pri", _wrap_source_cmp_pri, METH_VARARGS, NULL},
	 { (char *)"source_cmp_pri_name", _wrap_source_cmp_pri_name, METH_VARARGS, NULL},
	 { (char *)"source_cmp_no", _wrap_source_cmp_no, METH_VARARGS, NULL},
	 { (char *)"source_update", _wrap_source_update, METH_VARARGS, NULL},
	 { (char *)"source_printf", _wrap_source_printf, METH_VARARGS, NULL},
	 { (char *)"sources_update", _wrap_sources_update, METH_VARARGS, NULL},
	 { (char *)"source_clean", _wrap_source_clean, METH_VARARGS, NULL},
	 { (char *)"sources_clean", _wrap_sources_clean, METH_VARARGS, NULL},
	 { (char *)"source_make_idx", _wrap_source_make_idx, METH_VARARGS, NULL},
	 { (char *)"source_make_merged_idx", _wrap_source_make_merged_idx, METH_VARARGS, NULL},
	 { (char *)"sources_add", _wrap_sources_add, METH_VARARGS, NULL},
	 { (char *)"sources_score", _wrap_sources_score, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_set", _wrap_pkgdir_type_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_get", _wrap_pkgdir_type_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_name_set", _wrap_pkgdir_name_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_name_get", _wrap_pkgdir_name_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_path_set", _wrap_pkgdir_path_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_path_get", _wrap_pkgdir_path_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_idxpath_set", _wrap_pkgdir_idxpath_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_idxpath_get", _wrap_pkgdir_idxpath_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_compress_set", _wrap_pkgdir_compress_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_compress_get", _wrap_pkgdir_compress_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_pkgs_set", _wrap_pkgdir_pkgs_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_pkgs_get", _wrap_pkgdir_pkgs_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir__idx_version_set", _wrap_pkgdir__idx_version_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir__idx_version_get", _wrap_pkgdir__idx_version_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_pri_set", _wrap_pkgdir_pri_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_pri_get", _wrap_pkgdir_pri_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_depdirs_set", _wrap_pkgdir_depdirs_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_depdirs_get", _wrap_pkgdir_depdirs_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_foreign_depdirs_set", _wrap_pkgdir_foreign_depdirs_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_foreign_depdirs_get", _wrap_pkgdir_foreign_depdirs_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_pkgroups_set", _wrap_pkgdir_pkgroups_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_pkgroups_get", _wrap_pkgdir_pkgroups_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_flags_set", _wrap_pkgdir_flags_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_flags_get", _wrap_pkgdir_flags_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_ts_set", _wrap_pkgdir_ts_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_ts_get", _wrap_pkgdir_ts_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_removed_pkgs_set", _wrap_pkgdir_removed_pkgs_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_removed_pkgs_get", _wrap_pkgdir_removed_pkgs_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_orig_ts_set", _wrap_pkgdir_orig_ts_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_orig_ts_get", _wrap_pkgdir_orig_ts_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_orig_idxpath_set", _wrap_pkgdir_orig_idxpath_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_orig_idxpath_get", _wrap_pkgdir_orig_idxpath_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_lc_lang_set", _wrap_pkgdir_lc_lang_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_lc_lang_get", _wrap_pkgdir_lc_lang_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_avlangs_h_set", _wrap_pkgdir_avlangs_h_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_avlangs_h_get", _wrap_pkgdir_avlangs_h_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_langs_set", _wrap_pkgdir_langs_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_langs_get", _wrap_pkgdir_langs_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_dirindex_set", _wrap_pkgdir_dirindex_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_dirindex_get", _wrap_pkgdir_dirindex_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_prev_pkgdir_set", _wrap_pkgdir_prev_pkgdir_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_prev_pkgdir_get", _wrap_pkgdir_prev_pkgdir_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_src_set", _wrap_pkgdir_src_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_src_get", _wrap_pkgdir_src_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir__ldflags_set", _wrap_pkgdir__ldflags_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir__ldflags_get", _wrap_pkgdir__ldflags_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_na_set", _wrap_pkgdir_na_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_na_get", _wrap_pkgdir_na_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_mod_set", _wrap_pkgdir_mod_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_mod_get", _wrap_pkgdir_mod_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_mod_data_set", _wrap_pkgdir_mod_data_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_mod_data_get", _wrap_pkgdir_mod_data_get, METH_VARARGS, NULL},
	 { (char *)"new_pkgdir", _wrap_new_pkgdir, METH_VARARGS, NULL},
	 { (char *)"pkgdir_get_packages", _wrap_pkgdir_get_packages, METH_VARARGS, NULL},
	 { (char *)"pkgdir___str__", _wrap_pkgdir___str__, METH_VARARGS, NULL},
	 { (char *)"delete_pkgdir", _wrap_delete_pkgdir, METH_VARARGS, NULL},
	 { (char *)"pkgdir_swigregister", pkgdir_swigregister, METH_VARARGS, NULL},
	 { (char *)"pkgdir_malloc", _wrap_pkgdir_malloc, METH_VARARGS, NULL},
	 { (char *)"pkgdir_free", _wrap_pkgdir_free, METH_VARARGS, NULL},
	 { (char *)"pkgdir_srcopen", _wrap_pkgdir_srcopen, METH_VARARGS, NULL},
	 { (char *)"pkgdir_open_ext", _wrap_pkgdir_open_ext, METH_VARARGS, NULL},
	 { (char *)"pkgdir_open", _wrap_pkgdir_open, METH_VARARGS, NULL},
	 { (char *)"pkgdir_load", _wrap_pkgdir_load, METH_VARARGS, NULL},
	 { (char *)"pkgdir_save", _wrap_pkgdir_save, METH_VARARGS, NULL},
	 { (char *)"pkgdir_save_as", _wrap_pkgdir_save_as, METH_VARARGS, NULL},
	 { (char *)"pkgdir_diff", _wrap_pkgdir_diff, METH_VARARGS, NULL},
	 { (char *)"pkgdir_patch", _wrap_pkgdir_patch, METH_VARARGS, NULL},
	 { (char *)"pkgdir_update", _wrap_pkgdir_update, METH_VARARGS, NULL},
	 { (char *)"pkgdir_update_a", _wrap_pkgdir_update_a, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_info", _wrap_pkgdir_type_info, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_default_idxfn", _wrap_pkgdir_type_default_idxfn, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_default_compr", _wrap_pkgdir_type_default_compr, METH_VARARGS, NULL},
	 { (char *)"pkgdir_isremote", _wrap_pkgdir_isremote, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_uinf_name_set", _wrap_pkgdir_type_uinf_name_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_uinf_name_get", _wrap_pkgdir_type_uinf_name_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_uinf_aliases_set", _wrap_pkgdir_type_uinf_aliases_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_uinf_aliases_get", _wrap_pkgdir_type_uinf_aliases_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_uinf_description_set", _wrap_pkgdir_type_uinf_description_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_uinf_description_get", _wrap_pkgdir_type_uinf_description_get, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_uinf_mode_set", _wrap_pkgdir_type_uinf_mode_set, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_uinf_mode_get", _wrap_pkgdir_type_uinf_mode_get, METH_VARARGS, NULL},
	 { (char *)"new_pkgdir_type_uinf", _wrap_new_pkgdir_type_uinf, METH_VARARGS, NULL},
	 { (char *)"delete_pkgdir_type_uinf", _wrap_delete_pkgdir_type_uinf, METH_VARARGS, NULL},
	 { (char *)"pkgdir_type_uinf_swigregister", pkgdir_type_uinf_swigregister, METH_VARARGS, NULL},
	 { (char *)"pkgdir_typelist", _wrap_pkgdir_typelist, METH_VARARGS, NULL},
	 { (char *)"poclidek_new", _wrap_poclidek_new, METH_VARARGS, NULL},
	 { (char *)"poclidek_free", _wrap_poclidek_free, METH_VARARGS, NULL},
	 { (char *)"poclidek_load_packages", _wrap_poclidek_load_packages, METH_VARARGS, NULL},
	 { (char *)"poclidek_exec", _wrap_poclidek_exec, METH_VARARGS, NULL},
	 { (char *)"poclidek_execline", _wrap_poclidek_execline, METH_VARARGS, NULL},
	 { (char *)"poclidek_rcmd_new", _wrap_poclidek_rcmd_new, METH_VARARGS, NULL},
	 { (char *)"poclidek_rcmd_free", _wrap_poclidek_rcmd_free, METH_VARARGS, NULL},
	 { (char *)"poclidek_rcmd_exec", _wrap_poclidek_rcmd_exec, METH_VARARGS, NULL},
	 { (char *)"poclidek_rcmd_execline", _wrap_poclidek_rcmd_execline, METH_VARARGS, NULL},
	 { (char *)"poclidek_rcmd_get_packages", _wrap_poclidek_rcmd_get_packages, METH_VARARGS, NULL},
	 { (char *)"poclidek_rcmd_get_buf", _wrap_poclidek_rcmd_get_buf, METH_VARARGS, NULL},
	 { (char *)"poclidek_rcmd_get_output", _wrap_poclidek_rcmd_get_output, METH_VARARGS, NULL},
	 { (char *)"new_poldek_ctx", _wrap_new_poldek_ctx, METH_VARARGS, NULL},
	 { (char *)"delete_poldek_ctx", _wrap_delete_poldek_ctx, METH_VARARGS, NULL},
	 { (char *)"poldek_ctx_load_config", _wrap_poldek_ctx_load_config, METH_VARARGS, NULL},
	 { (char *)"poldek_ctx_configure", _wrap_poldek_ctx_configure, METH_VARARGS, NULL},
	 { (char *)"poldek_ctx_ts_new", _wrap_poldek_ctx_ts_new, METH_VARARGS, NULL},
	 { (char *)"poldek_ctx_set_verbose", _wrap_poldek_ctx_set_verbose, METH_VARARGS, NULL},
	 { (char *)"poldek_ctx_set_callbacks", _wrap_poldek_ctx_set_callbacks, METH_VARARGS, NULL},
	 { (char *)"poldek_ctx_set_vfile_progress", _wrap_poldek_ctx_set_vfile_progress, METH_VARARGS, NULL},
	 { (char *)"poldek_ctx_swigregister", poldek_ctx_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_poldek_ts", _wrap_new_poldek_ts, METH_VARARGS, NULL},
	 { (char *)"delete_poldek_ts", _wrap_delete_poldek_ts, METH_VARARGS, NULL},
	 { (char *)"poldek_ts_swigregister", poldek_ts_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_pkguinf", _wrap_new_pkguinf, METH_VARARGS, NULL},
	 { (char *)"delete_pkguinf", _wrap_delete_pkguinf, METH_VARARGS, NULL},
	 { (char *)"pkguinf_swigregister", pkguinf_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_pkgflist_it", _wrap_new_pkgflist_it, METH_VARARGS, NULL},
	 { (char *)"pkgflist_it_get_tuple", _wrap_pkgflist_it_get_tuple, METH_VARARGS, NULL},
	 { (char *)"delete_pkgflist_it", _wrap_delete_pkgflist_it, METH_VARARGS, NULL},
	 { (char *)"pkgflist_it_swigregister", pkgflist_it_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_poclidek_ctx", _wrap_new_poclidek_ctx, METH_VARARGS, NULL},
	 { (char *)"poclidek_ctx_pwd", _wrap_poclidek_ctx_pwd, METH_VARARGS, NULL},
	 { (char *)"poclidek_ctx_chdir", _wrap_poclidek_ctx_chdir, METH_VARARGS, NULL},
	 { (char *)"delete_poclidek_ctx", _wrap_delete_poclidek_ctx, METH_VARARGS, NULL},
	 { (char *)"poclidek_ctx_swigregister", poclidek_ctx_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_poclidek_rcmd", _wrap_new_poclidek_rcmd, METH_VARARGS, NULL},
	 { (char *)"poclidek_rcmd_execute", _wrap_poclidek_rcmd_execute, METH_VARARGS, NULL},
	 { (char *)"poclidek_rcmd_to_s", _wrap_poclidek_rcmd_to_s, METH_VARARGS, NULL},
	 { (char *)"delete_poclidek_rcmd", _wrap_delete_poclidek_rcmd, METH_VARARGS, NULL},
	 { (char *)"poclidek_rcmd_swigregister", poclidek_rcmd_swigregister, METH_VARARGS, NULL},
	 { NULL, NULL, 0, NULL }
};


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

static swig_type_info _swigt__p_capreq = {"_p_capreq", "struct capreq *|capreq *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_struct_trurl_array_private__p_tn_tuple = {"_p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_struct_trurl_array_private__p_tn_tuple", "tn_tuple *(*)(tn_alloc *,struct pkg const *,void *,struct trurl_array_private *)|tn_tuple *(*)(tn_alloc *,struct pkg const *,void *,tn_array *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_tn_array__p_pkguinf = {"_p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_tn_array__p_pkguinf", "struct pkguinf *(*)(tn_alloc *,struct pkg const *,void *,tn_array *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_tn_alloc_p_void__void = {"_p_f_p_tn_alloc_p_void__void", "void (*)(tn_alloc *,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "void (*)(void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_void_p_void__void = {"_p_f_p_void_p_void__void", "void (*)(void *,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "intptr_t *|int *|int_least32_t *|int_fast32_t *|int32_t *|int_fast16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long_long = {"_p_long_long", "int_least64_t *|int_fast64_t *|int64_t *|long long *|intmax_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_flfile = {"_p_p_flfile", "struct flfile **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_trurl_array_private = {"_p_p_trurl_array_private", "tn_array **|struct trurl_array_private **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pkg = {"_p_pkg", "pkg *|struct pkg *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pkgdir = {"_p_pkgdir", "struct pkgdir *|pkgdir *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pkgdir_dirindex = {"_p_pkgdir_dirindex", "struct pkgdir_dirindex *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pkgdir_module = {"_p_pkgdir_module", "struct pkgdir_module *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pkgdir_type_uinf = {"_p_pkgdir_type_uinf", "struct pkgdir_type_uinf *|pkgdir_type_uinf *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pkgflist = {"_p_pkgflist", "struct pkgflist *|pkgflist *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pkgflist_it = {"_p_pkgflist_it", "struct pkgflist_it *|pkgflist_it *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pkgroup_idx = {"_p_pkgroup_idx", "struct pkgroup_idx *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pkguinf = {"_p_pkguinf", "struct pkguinf *|pkguinf *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pm_ctx = {"_p_pm_ctx", "struct pm_ctx *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_poclidek_ctx = {"_p_poclidek_ctx", "struct poclidek_ctx *|poclidek_ctx *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_poclidek_rcmd = {"_p_poclidek_rcmd", "struct poclidek_rcmd *|poclidek_rcmd *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_poldek_ctx = {"_p_poldek_ctx", "struct poldek_ctx *|poldek_ctx *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_poldek_ts = {"_p_poldek_ts", "struct poldek_ts *|poldek_ts *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_source = {"_p_source", "struct source *|source *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_t_fn_cmp = {"_p_t_fn_cmp", "t_fn_cmp *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_t_fn_dup = {"_p_t_fn_dup", "t_fn_dup *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_t_fn_free = {"_p_t_fn_free", "t_fn_free *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_time_t = {"_p_time_t", "time_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_tn_alloc = {"_p_tn_alloc", "tn_alloc *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_tn_buf = {"_p_tn_buf", "tn_buf *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_tn_fn_cmp = {"_p_tn_fn_cmp", "tn_fn_cmp *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_tn_fn_dup = {"_p_tn_fn_dup", "tn_fn_dup *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_tn_fn_free = {"_p_tn_fn_free", "tn_fn_free *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_tn_hash = {"_p_tn_hash", "tn_hash *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_tn_tuple = {"_p_tn_tuple", "tn_tuple *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_trurl_array_private = {"_p_trurl_array_private", "tn_array *|struct trurl_array_private *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uintptr_t *|uint_least32_t *|uint_fast32_t *|uint32_t *|unsigned int *|uint_fast16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint_least64_t *|uint_fast64_t *|uint64_t *|unsigned long long *|uintmax_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_capreq,
  &_swigt__p_char,
  &_swigt__p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_struct_trurl_array_private__p_tn_tuple,
  &_swigt__p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_tn_array__p_pkguinf,
  &_swigt__p_f_p_tn_alloc_p_void__void,
  &_swigt__p_f_p_void__void,
  &_swigt__p_f_p_void_p_void__void,
  &_swigt__p_int,
  &_swigt__p_long_long,
  &_swigt__p_p_char,
  &_swigt__p_p_flfile,
  &_swigt__p_p_trurl_array_private,
  &_swigt__p_p_void,
  &_swigt__p_pkg,
  &_swigt__p_pkgdir,
  &_swigt__p_pkgdir_dirindex,
  &_swigt__p_pkgdir_module,
  &_swigt__p_pkgdir_type_uinf,
  &_swigt__p_pkgflist,
  &_swigt__p_pkgflist_it,
  &_swigt__p_pkgroup_idx,
  &_swigt__p_pkguinf,
  &_swigt__p_pm_ctx,
  &_swigt__p_poclidek_ctx,
  &_swigt__p_poclidek_rcmd,
  &_swigt__p_poldek_ctx,
  &_swigt__p_poldek_ts,
  &_swigt__p_short,
  &_swigt__p_signed_char,
  &_swigt__p_source,
  &_swigt__p_t_fn_cmp,
  &_swigt__p_t_fn_dup,
  &_swigt__p_t_fn_free,
  &_swigt__p_time_t,
  &_swigt__p_tn_alloc,
  &_swigt__p_tn_buf,
  &_swigt__p_tn_fn_cmp,
  &_swigt__p_tn_fn_dup,
  &_swigt__p_tn_fn_free,
  &_swigt__p_tn_hash,
  &_swigt__p_tn_tuple,
  &_swigt__p_trurl_array_private,
  &_swigt__p_unsigned_char,
  &_swigt__p_unsigned_int,
  &_swigt__p_unsigned_long_long,
  &_swigt__p_unsigned_short,
  &_swigt__p_void,
};

static swig_cast_info _swigc__p_capreq[] = {  {&_swigt__p_capreq, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_struct_trurl_array_private__p_tn_tuple[] = {  {&_swigt__p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_struct_trurl_array_private__p_tn_tuple, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_tn_array__p_pkguinf[] = {  {&_swigt__p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_tn_array__p_pkguinf, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_tn_alloc_p_void__void[] = {  {&_swigt__p_f_p_tn_alloc_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_void__void[] = {  {&_swigt__p_f_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_void_p_void__void[] = {  {&_swigt__p_f_p_void_p_void__void, 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_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_flfile[] = {  {&_swigt__p_p_flfile, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_trurl_array_private[] = {  {&_swigt__p_p_trurl_array_private, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pkg[] = {  {&_swigt__p_pkg, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pkgdir[] = {  {&_swigt__p_pkgdir, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pkgdir_dirindex[] = {  {&_swigt__p_pkgdir_dirindex, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pkgdir_module[] = {  {&_swigt__p_pkgdir_module, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pkgdir_type_uinf[] = {  {&_swigt__p_pkgdir_type_uinf, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pkgflist[] = {  {&_swigt__p_pkgflist, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pkgflist_it[] = {  {&_swigt__p_pkgflist_it, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pkgroup_idx[] = {  {&_swigt__p_pkgroup_idx, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pkguinf[] = {  {&_swigt__p_pkguinf, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pm_ctx[] = {  {&_swigt__p_pm_ctx, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_poclidek_ctx[] = {  {&_swigt__p_poclidek_ctx, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_poclidek_rcmd[] = {  {&_swigt__p_poclidek_rcmd, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_poldek_ctx[] = {  {&_swigt__p_poldek_ctx, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_poldek_ts[] = {  {&_swigt__p_poldek_ts, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_source[] = {  {&_swigt__p_source, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_t_fn_cmp[] = {  {&_swigt__p_t_fn_cmp, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_t_fn_dup[] = {  {&_swigt__p_t_fn_dup, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_t_fn_free[] = {  {&_swigt__p_t_fn_free, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_time_t[] = {  {&_swigt__p_time_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_tn_alloc[] = {  {&_swigt__p_tn_alloc, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_tn_buf[] = {  {&_swigt__p_tn_buf, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_tn_fn_cmp[] = {  {&_swigt__p_tn_fn_cmp, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_tn_fn_dup[] = {  {&_swigt__p_tn_fn_dup, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_tn_fn_free[] = {  {&_swigt__p_tn_fn_free, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_tn_hash[] = {  {&_swigt__p_tn_hash, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_tn_tuple[] = {  {&_swigt__p_tn_tuple, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_trurl_array_private[] = {  {&_swigt__p_trurl_array_private, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 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_long[] = {  {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_short[] = {  {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_capreq,
  _swigc__p_char,
  _swigc__p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_struct_trurl_array_private__p_tn_tuple,
  _swigc__p_f_p_tn_alloc_p_q_const__struct_pkg_p_void_p_tn_array__p_pkguinf,
  _swigc__p_f_p_tn_alloc_p_void__void,
  _swigc__p_f_p_void__void,
  _swigc__p_f_p_void_p_void__void,
  _swigc__p_int,
  _swigc__p_long_long,
  _swigc__p_p_char,
  _swigc__p_p_flfile,
  _swigc__p_p_trurl_array_private,
  _swigc__p_p_void,
  _swigc__p_pkg,
  _swigc__p_pkgdir,
  _swigc__p_pkgdir_dirindex,
  _swigc__p_pkgdir_module,
  _swigc__p_pkgdir_type_uinf,
  _swigc__p_pkgflist,
  _swigc__p_pkgflist_it,
  _swigc__p_pkgroup_idx,
  _swigc__p_pkguinf,
  _swigc__p_pm_ctx,
  _swigc__p_poclidek_ctx,
  _swigc__p_poclidek_rcmd,
  _swigc__p_poldek_ctx,
  _swigc__p_poldek_ts,
  _swigc__p_short,
  _swigc__p_signed_char,
  _swigc__p_source,
  _swigc__p_t_fn_cmp,
  _swigc__p_t_fn_dup,
  _swigc__p_t_fn_free,
  _swigc__p_time_t,
  _swigc__p_tn_alloc,
  _swigc__p_tn_buf,
  _swigc__p_tn_fn_cmp,
  _swigc__p_tn_fn_dup,
  _swigc__p_tn_fn_free,
  _swigc__p_tn_hash,
  _swigc__p_tn_tuple,
  _swigc__p_trurl_array_private,
  _swigc__p_unsigned_char,
  _swigc__p_unsigned_int,
  _swigc__p_unsigned_long_long,
  _swigc__p_unsigned_short,
  _swigc__p_void,
};


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

static swig_const_info swig_const_table[] = {
{0, 0, 0, 0.0, 0, 0}};

#ifdef __cplusplus
}
#endif
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic 
 * memory is used. Also, since swig_type_info structures store pointers to 
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization. 
 * The idea is that swig generates all the structures that are needed. 
 * The runtime then collects these partially filled structures. 
 * The SWIG_InitializeModule function takes these initial arrays out of 
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned staticly to an initial 
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it 
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded. 
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the 
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int found, init;
  
  clientdata = clientdata;
  
  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }
  
  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
    module_head = &swig_module;
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    found=0;
    iter=module_head;
    do {
      if (iter==&swig_module) {
        found=1;
        break;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* if the is found in the list, then all is done and we may leave */
    if (found) return;
    /* otherwise we must add out module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpeters are used, a module could have already been initialized in
       a different interpreter, but not yet have a pointer in this interpreter.
       In this case, we do not want to continue adding types... everything should be
       set up already */
  if (init == 0) return;
  
  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif
    
    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
        type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }
    
    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
        if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
          cast->type = ret;
          ret = 0;
        } else {
          /* Check for casting already in the list */
          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
          if (!ocast) ret = 0;
        }
      }
      
      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;
  
#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
    printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;
  
  if (init_run) return;
  init_run = 1;
  
  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{
  /* c-mode */
#endif
}
#endif



#ifdef __cplusplus
extern "C" {
#endif
  
  /* Python-specific SWIG API */
#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
  
  /* -----------------------------------------------------------------------------
   * global variable support code.
   * ----------------------------------------------------------------------------- */
  
  typedef struct swig_globalvar {
    char       *name;                  /* Name of global variable */
    PyObject *(*get_attr)(void);       /* Return the current value */
    int       (*set_attr)(PyObject *); /* Set the value */
    struct swig_globalvar *next;
  } swig_globalvar;
  
  typedef struct swig_varlinkobject {
    PyObject_HEAD
    swig_globalvar *vars;
  } swig_varlinkobject;
  
  SWIGINTERN PyObject *
  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
#if PY_VERSION_HEX >= 0x03000000
    return PyUnicode_InternFromString("<Swig global variables>");
#else
    return PyString_FromString("<Swig global variables>");
#endif
  }
  
  SWIGINTERN PyObject *
  swig_varlink_str(swig_varlinkobject *v) {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *str = PyUnicode_InternFromString("(");
    PyObject *tail;
    PyObject *joined;
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      tail = PyUnicode_FromString(var->name);
      joined = PyUnicode_Concat(str, tail);
      Py_DecRef(str);
      Py_DecRef(tail);
      str = joined;
      if (var->next) {
        tail = PyUnicode_InternFromString(", ");
        joined = PyUnicode_Concat(str, tail);
        Py_DecRef(str);
        Py_DecRef(tail);
        str = joined;
      }
    }
    tail = PyUnicode_InternFromString(")");
    joined = PyUnicode_Concat(str, tail);
    Py_DecRef(str);
    Py_DecRef(tail);
    str = joined;
#else
    PyObject *str = PyString_FromString("(");
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
    }
    PyString_ConcatAndDel(&str,PyString_FromString(")"));
#endif
    return str;
  }
  
  SWIGINTERN int
  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
    char *tmp;
    PyObject *str = swig_varlink_str(v);
    fprintf(fp,"Swig global variables ");
    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(str);
    return 0;
  }
  
  SWIGINTERN void
  swig_varlink_dealloc(swig_varlinkobject *v) {
    swig_globalvar *var = v->vars;
    while (var) {
      swig_globalvar *n = var->next;
      free(var->name);
      free(var);
      var = n;
    }
  }
  
  SWIGINTERN PyObject *
  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
    PyObject *res = NULL;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->get_attr)();
        break;
      }
      var = var->next;
    }
    if (res == NULL && !PyErr_Occurred()) {
      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
    }
    return res;
  }
  
  SWIGINTERN int
  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
    int res = 1;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->set_attr)(p);
        break;
      }
      var = var->next;
    }
    if (res == 1 && !PyErr_Occurred()) {
      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
    }
    return res;
  }
  
  SWIGINTERN PyTypeObject*
  swig_varlink_type(void) {
    static char varlink__doc__[] = "Swig var link object";
    static PyTypeObject varlink_type;
    static int type_init = 0;  
    if (!type_init) {
      const PyTypeObject tmp
      = {
        /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000
        PyVarObject_HEAD_INIT(&PyType_Type, 0)
#else
        PyObject_HEAD_INIT(NULL)
        0,                                  /* Number of items in variable part (ob_size) */
#endif
        (char *)"swigvarlink",              /* Type name (tp_name) */
        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
        0,                                  /* Itemsize (tp_itemsize) */
        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
        (printfunc) swig_varlink_print,     /* Print (tp_print) */
        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
        0,                                  /* tp_compare */
        (reprfunc) swig_varlink_repr,       /* tp_repr */
        0,                                  /* tp_as_number */
        0,                                  /* tp_as_sequence */
        0,                                  /* tp_as_mapping */
        0,                                  /* tp_hash */
        0,                                  /* tp_call */
        (reprfunc) swig_varlink_str,        /* tp_str */
        0,                                  /* tp_getattro */
        0,                                  /* tp_setattro */
        0,                                  /* tp_as_buffer */
        0,                                  /* tp_flags */
        varlink__doc__,                     /* tp_doc */
        0,                                  /* tp_traverse */
        0,                                  /* tp_clear */
        0,                                  /* tp_richcompare */
        0,                                  /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
        0,                                  /* tp_del */
#endif
#ifdef COUNT_ALLOCS
        0,0,0,0                             /* tp_alloc -> tp_next */
#endif
      };
      varlink_type = tmp;
      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
#if PY_VERSION_HEX < 0x03000000
      varlink_type.ob_type = &PyType_Type;
#endif
      type_init = 1;
    }
    return &varlink_type;
  }
  
  /* Create a variable linking object for use later */
  SWIGINTERN PyObject *
  SWIG_Python_newvarlink(void) {
    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
    if (result) {
      result->vars = 0;
    }
    return ((PyObject*) result);
  }
  
  SWIGINTERN void 
  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
    swig_varlinkobject *v = (swig_varlinkobject *) p;
    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
    if (gv) {
      size_t size = strlen(name)+1;
      gv->name = (char *)malloc(size);
      if (gv->name) {
        strncpy(gv->name,name,size);
        gv->get_attr = get_attr;
        gv->set_attr = set_attr;
        gv->next = v->vars;
      }
    }
    v->vars = gv;
  }
  
  SWIGINTERN PyObject *
  SWIG_globals(void) {
    static PyObject *_SWIG_globals = 0; 
    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
    return _SWIG_globals;
  }
  
  /* -----------------------------------------------------------------------------
   * constants/methods manipulation
   * ----------------------------------------------------------------------------- */
  
  /* Install Constants */
  SWIGINTERN void
  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
    PyObject *obj = 0;
    size_t i;
    for (i = 0; constants[i].type; ++i) {
      switch(constants[i].type) {
      case SWIG_PY_POINTER:
        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
        break;
      case SWIG_PY_BINARY:
        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
        break;
      default:
        obj = 0;
        break;
      }
      if (obj) {
        PyDict_SetItemString(d, constants[i].name, obj);
        Py_DECREF(obj);
      }
    }
  }
  
  /* -----------------------------------------------------------------------------*/
  /* Fix SwigMethods to carry the callback ptrs when needed */
  /* -----------------------------------------------------------------------------*/
  
  SWIGINTERN void
  SWIG_Python_FixMethods(PyMethodDef *methods,
    swig_const_info *const_table,
    swig_type_info **types,
    swig_type_info **types_initial) {
    size_t i;
    for (i = 0; methods[i].ml_name; ++i) {
      const char *c = methods[i].ml_doc;
      if (c && (c = strstr(c, "swig_ptr: "))) {
        int j;
        swig_const_info *ci = 0;
        const char *name = c + 10;
        for (j = 0; const_table[j].type; ++j) {
          if (strncmp(const_table[j].name, name, 
              strlen(const_table[j].name)) == 0) {
            ci = &(const_table[j]);
            break;
          }
        }
        if (ci) {
          size_t shift = (ci->ptype) - types;
          swig_type_info *ty = types_initial[shift];
          size_t ldoc = (c - methods[i].ml_doc);
          size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
          char *ndoc = (char*)malloc(ldoc + lptr + 10);
          if (ndoc) {
            char *buff = ndoc;
            void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
            if (ptr) {
              strncpy(buff, methods[i].ml_doc, ldoc);
              buff += ldoc;
              strncpy(buff, "swig_ptr: ", 10);
              buff += 10;
              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
              methods[i].ml_doc = ndoc;
            }
          }
        }
      }
    }
  } 
  
#ifdef __cplusplus
}
#endif

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

#ifdef __cplusplus
extern "C"
#endif

SWIGEXPORT 
#if PY_VERSION_HEX >= 0x03000000
PyObject*
#else
void
#endif
SWIG_init(void) {
  PyObject *m, *d;  
#if PY_VERSION_HEX >= 0x03000000
  static struct PyModuleDef SWIG_module = {
    PyModuleDef_HEAD_INIT,
    (char *) SWIG_name,
    NULL,
    -1,
    SwigMethods,
    NULL,
    NULL,
    NULL,
    NULL
  };
#endif
  
  /* Fix SwigMethods to carry the callback ptrs when needed */
  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  
#if PY_VERSION_HEX >= 0x03000000
  m = PyModule_Create(&SWIG_module);
#else
  m = Py_InitModule((char *) SWIG_name, SwigMethods);
#endif
  d = PyModule_GetDict(m);
  
  SWIG_InitializeModule(0);
  SWIG_InstallConstants(d,swig_const_table);
  
  
  SWIG_Python_SetConstant(d, "TN_ARRAY_CONSTSIZE",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "TN_ARRAY_AUTOSORTED",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "TN_ARRAY_FROZEN",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "TN_ARRAY_INTERNAL_ISSORTED",SWIG_From_int((int)((1 << 8))));
  SWIG_Python_SetConstant(d, "TN_ARRAY_INTERNAL_NA",SWIG_From_int((int)((1 << 9))));
  SWIG_Python_SetConstant(d, "REL_EQ",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "REL_GT",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "REL_LT",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "REL_ALL",SWIG_From_int((int)(((1 << 0)|(1 << 1)|(1 << 2)))));
  SWIG_Python_SetConstant(d, "CAPREQ_CNFL",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "CAPREQ_PREREQ",SWIG_From_int((int)((1 << 3))));
  SWIG_Python_SetConstant(d, "CAPREQ_PREREQ_UN",SWIG_From_int((int)((1 << 4))));
  SWIG_Python_SetConstant(d, "CAPREQ_OBCNFL",SWIG_From_int((int)((1 << 3))));
  SWIG_Python_SetConstant(d, "CAPREQ_RPMLIB",SWIG_From_int((int)((1 << 5))));
  SWIG_Python_SetConstant(d, "CAPREQ_ISDIR",SWIG_From_int((int)((1 << 6))));
  SWIG_Python_SetConstant(d, "CAPREQ_BASTARD",SWIG_From_int((int)((1 << 7))));
  SWIG_Python_SetConstant(d, "CAPREQ_RT_FLAGS",SWIG_From_int((int)(((1 << 6)|(1 << 7)))));
  SWIG_Python_SetConstant(d, "PKG_HAS_SRCFN",SWIG_From_int((int)((1 << 4))));
  SWIG_Python_SetConstant(d, "PKG_HAS_PKGUINF",SWIG_From_int((int)((1 << 5))));
  SWIG_Python_SetConstant(d, "PKG_HAS_SELFCAP",SWIG_From_int((int)((1 << 6))));
  SWIG_Python_SetConstant(d, "PKG_HELD",SWIG_From_int((int)((1 << 12))));
  SWIG_Python_SetConstant(d, "PKG_IGNORED",SWIG_From_int((int)((1 << 13))));
  SWIG_Python_SetConstant(d, "PKG_IGNORED_UNIQ",SWIG_From_int((int)((1 << 14))));
  SWIG_Python_SetConstant(d, "PKG_ORDER_PREREQ",SWIG_From_int((int)((1 << 15))));
  SWIG_Python_SetConstant(d, "PKG_DBPKG",SWIG_From_int((int)((1 << 16))));
  SWIG_Python_SetConstant(d, "PKG_INCLUDED_DIRREQS",SWIG_From_int((int)((1 << 17))));
  SWIG_Python_SetConstant(d, "PKG_LDNEVR",SWIG_From_int((int)(0)));
  SWIG_Python_SetConstant(d, "PKG_LDCAPS",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "PKG_LDREQS",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "PKG_LDCNFLS",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "PKG_LDFL_DEPDIRS",SWIG_From_int((int)((1 << 3))));
  SWIG_Python_SetConstant(d, "PKG_LDFL_WHOLE",SWIG_From_int((int)((1 << 4))));
  SWIG_Python_SetConstant(d, "PKG_LDCAPREQS",SWIG_From_int((int)((1 << 0)|(1 << 1)|(1 << 2))));
  SWIG_Python_SetConstant(d, "PKG_LDWHOLE",SWIG_From_int((int)((1 << 0)|(1 << 1)|(1 << 2)|(1 << 4))));
  SWIG_Python_SetConstant(d, "PKG_LDWHOLE_FLDEPDIRS",SWIG_From_int((int)((1 << 0)|(1 << 1)|(1 << 2)|(1 << 3))));
  SWIG_Python_SetConstant(d, "POLDEK_MA_PROMOTE_VERSION",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "POLDEK_MA_PROMOTE_REQEPOCH",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "POLDEK_MA_PROMOTE_CAPEPOCH",SWIG_From_int((int)((1 << 3))));
  SWIG_Python_SetConstant(d, "POLDEK_MA_PROMOTE_EPOCH",SWIG_From_int((int)(((1 << 2)|(1 << 3)))));
  SWIG_Python_SetConstant(d, "PKGUINF_LICENSE",SWIG_From_char((char)('l')));
  SWIG_Python_SetConstant(d, "PKGUINF_URL",SWIG_From_char((char)('u')));
  SWIG_Python_SetConstant(d, "PKGUINF_SUMMARY",SWIG_From_char((char)('s')));
  SWIG_Python_SetConstant(d, "PKGUINF_DESCRIPTION",SWIG_From_char((char)('d')));
  SWIG_Python_SetConstant(d, "PKGUINF_VENDOR",SWIG_From_char((char)('v')));
  SWIG_Python_SetConstant(d, "PKGUINF_BUILDHOST",SWIG_From_char((char)('b')));
  SWIG_Python_SetConstant(d, "PKGUINF_DISTRO",SWIG_From_char((char)('D')));
  SWIG_Python_SetConstant(d, "PKGUINF_LEGACY_SOURCERPM",SWIG_From_char((char)('S')));
  SWIG_Python_SetConstant(d, "PKGUINF_CHANGELOG",SWIG_From_char((char)('C')));
  PyDict_SetItemString(d,(char*)"cvar", SWIG_globals());
  SWIG_addvarlink(SWIG_globals(),(char*)"poldek_BUG_MAILADDR",Swig_var_poldek_BUG_MAILADDR_get, Swig_var_poldek_BUG_MAILADDR_set);
  SWIG_addvarlink(SWIG_globals(),(char*)"poldek_VERSION_BANNER",Swig_var_poldek_VERSION_BANNER_get, Swig_var_poldek_VERSION_BANNER_set);
  SWIG_addvarlink(SWIG_globals(),(char*)"poldek_BANNER",Swig_var_poldek_BANNER_get, Swig_var_poldek_BANNER_set);
  SWIG_Python_SetConstant(d, "POLDEK_CONF_OPT",SWIG_From_int((int)(0)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_CACHEDIR",SWIG_From_int((int)(3)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_FETCHDIR",SWIG_From_int((int)(4)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_ROOTDIR",SWIG_From_int((int)(5)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_DUMPFILE",SWIG_From_int((int)(6)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_PRIFILE",SWIG_From_int((int)(7)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_SOURCE",SWIG_From_int((int)(8)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_RPMMACROS",SWIG_From_int((int)(9)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_RPMOPTS",SWIG_From_int((int)(10)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_HOLD",SWIG_From_int((int)(11)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_IGNORE",SWIG_From_int((int)(12)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_PM",SWIG_From_int((int)(13)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_DESTINATION",SWIG_From_int((int)(14)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_DEPGRAPH",SWIG_From_int((int)(15)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_LOGFILE",SWIG_From_int((int)(20)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_LOGTTY",SWIG_From_int((int)(21)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_GOODBYE_CB",SWIG_From_int((int)(22)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_CONFIRM_CB",SWIG_From_int((int)(23)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_TSCONFIRM_CB",SWIG_From_int((int)(24)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_CHOOSEEQUIV_CB",SWIG_From_int((int)(25)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_CHOOSESUGGESTS_CB",SWIG_From_int((int)(26)));
  SWIG_Python_SetConstant(d, "POLDEK_CONF_VFILEPROGRESS",SWIG_From_int((int)(27)));
  SWIG_Python_SetConstant(d, "POLDEK_LOADCONF_NOCONF",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "POLDEK_LOADCONF_UPCONF",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "POLDEK_ST_RECNO",SWIG_From_int((int)(POLDEK_ST_RECNO)));
  SWIG_Python_SetConstant(d, "POLDEK_ST_NAME",SWIG_From_int((int)(POLDEK_ST_NAME)));
  SWIG_Python_SetConstant(d, "POLDEK_ST_CAP",SWIG_From_int((int)(POLDEK_ST_CAP)));
  SWIG_Python_SetConstant(d, "POLDEK_ST_REQ",SWIG_From_int((int)(POLDEK_ST_REQ)));
  SWIG_Python_SetConstant(d, "POLDEK_ST_CNFL",SWIG_From_int((int)(POLDEK_ST_CNFL)));
  SWIG_Python_SetConstant(d, "POLDEK_ST_OBSL",SWIG_From_int((int)(POLDEK_ST_OBSL)));
  SWIG_Python_SetConstant(d, "POLDEK_ST_FILE",SWIG_From_int((int)(POLDEK_ST_FILE)));
  SWIG_Python_SetConstant(d, "POLDEK_ST_PROVIDES",SWIG_From_int((int)(POLDEK_ST_PROVIDES)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_INSTALL",SWIG_From_int((int)(POLDEK_TS_INSTALL)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_UNINSTALL",SWIG_From_int((int)(POLDEK_TS_UNINSTALL)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_VERIFY",SWIG_From_int((int)(POLDEK_TS_VERIFY)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_DIST",SWIG_From_int((int)(POLDEK_TS_DIST)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_UPGRADE",SWIG_From_int((int)(POLDEK_TS_UPGRADE)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_DOWNGRADE",SWIG_From_int((int)(POLDEK_TS_DOWNGRADE)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_REINSTALL",SWIG_From_int((int)(POLDEK_TS_REINSTALL)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_UPGRADEDIST",SWIG_From_int((int)(POLDEK_TS_UPGRADEDIST)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_INSTALLDIST",SWIG_From_int((int)(POLDEK_TS_INSTALLDIST)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_TRACK",SWIG_From_int((int)(POLDEK_TS_TRACK)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_TYPE_INSTALL",SWIG_From_int((int)(POLDEK_TS_TYPE_INSTALL)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_TYPE_UNINSTALL",SWIG_From_int((int)(POLDEK_TS_TYPE_UNINSTALL)));
  SWIG_Python_SetConstant(d, "POLDEK_TS_TYPE_VERIFY",SWIG_From_int((int)(POLDEK_TS_TYPE_VERIFY)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_NULL",SWIG_From_int((int)(POLDEK_OP_NULL)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_UNIQN",SWIG_From_int((int)(POLDEK_OP_UNIQN)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_VRFY_DEPS",SWIG_From_int((int)(POLDEK_OP_VRFY_DEPS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_VRFY_ORDER",SWIG_From_int((int)(POLDEK_OP_VRFY_ORDER)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_VRFY_CNFLS",SWIG_From_int((int)(POLDEK_OP_VRFY_CNFLS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_VRFY_FILECNFLS",SWIG_From_int((int)(POLDEK_OP_VRFY_FILECNFLS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_VRFY_FILEORPHANS",SWIG_From_int((int)(POLDEK_OP_VRFY_FILEORPHANS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_VRFY_FILEMISSDEPS",SWIG_From_int((int)(POLDEK_OP_VRFY_FILEMISSDEPS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_DEPGRAPH",SWIG_From_int((int)(POLDEK_OP_DEPGRAPH)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_LDALLDESC",SWIG_From_int((int)(POLDEK_OP_LDALLDESC)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_LDFULLFILELIST",SWIG_From_int((int)(POLDEK_OP_LDFULLFILELIST)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_VRFYMERCY",SWIG_From_int((int)(POLDEK_OP_VRFYMERCY)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_PROMOTEPOCH",SWIG_From_int((int)(POLDEK_OP_PROMOTEPOCH)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_FOLLOW",SWIG_From_int((int)(POLDEK_OP_FOLLOW)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_FRESHEN",SWIG_From_int((int)(POLDEK_OP_FRESHEN)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_GREEDY",SWIG_From_int((int)(POLDEK_OP_GREEDY)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_CONFLICTS",SWIG_From_int((int)(POLDEK_OP_CONFLICTS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_OBSOLETES",SWIG_From_int((int)(POLDEK_OP_OBSOLETES)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_SUGGESTS",SWIG_From_int((int)(POLDEK_OP_SUGGESTS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_AGGREEDY",SWIG_From_int((int)(POLDEK_OP_AGGREEDY)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_ALLOWDUPS",SWIG_From_int((int)(POLDEK_OP_ALLOWDUPS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_NODEPS",SWIG_From_int((int)(POLDEK_OP_NODEPS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_AUTODIRDEP",SWIG_From_int((int)(POLDEK_OP_AUTODIRDEP)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_CAPLOOKUP",SWIG_From_int((int)(POLDEK_OP_CAPLOOKUP)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_MULTILIB",SWIG_From_int((int)(POLDEK_OP_MULTILIB)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_FORCE",SWIG_From_int((int)(POLDEK_OP_FORCE)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_IGNOREARCH",SWIG_From_int((int)(POLDEK_OP_IGNOREARCH)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_IGNOREOS",SWIG_From_int((int)(POLDEK_OP_IGNOREOS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_TEST",SWIG_From_int((int)(POLDEK_OP_TEST)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_RPMTEST",SWIG_From_int((int)(POLDEK_OP_RPMTEST)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_JUSTDB",SWIG_From_int((int)(POLDEK_OP_JUSTDB)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_JUSTFETCH",SWIG_From_int((int)(POLDEK_OP_JUSTFETCH)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_JUSTPRINT",SWIG_From_int((int)(POLDEK_OP_JUSTPRINT)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_JUSTPRINT_N",SWIG_From_int((int)(POLDEK_OP_JUSTPRINT_N)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_MKDBDIR",SWIG_From_int((int)(POLDEK_OP_MKDBDIR)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_USESUDO",SWIG_From_int((int)(POLDEK_OP_USESUDO)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_HOLD",SWIG_From_int((int)(POLDEK_OP_HOLD)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_IGNORE",SWIG_From_int((int)(POLDEK_OP_IGNORE)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_PARTICLE",SWIG_From_int((int)(POLDEK_OP_PARTICLE)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_KEEP_DOWNLOADS",SWIG_From_int((int)(POLDEK_OP_KEEP_DOWNLOADS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_CHECKSIG",SWIG_From_int((int)(POLDEK_OP_CHECKSIG)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_CONFIRM_INST",SWIG_From_int((int)(POLDEK_OP_CONFIRM_INST)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_CONFIRM_UNINST",SWIG_From_int((int)(POLDEK_OP_CONFIRM_UNINST)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_EQPKG_ASKUSER",SWIG_From_int((int)(POLDEK_OP_EQPKG_ASKUSER)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_IS_INTERACTIVE_ON",SWIG_From_int((int)(POLDEK_OP_IS_INTERACTIVE_ON)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_NOFETCH",SWIG_From_int((int)(POLDEK_OP_NOFETCH)));
  SWIG_Python_SetConstant(d, "POLDEK_OP_PARSABLETS",SWIG_From_int((int)(POLDEK_OP_PARSABLETS)));
  SWIG_Python_SetConstant(d, "POLDEK_OP___MAXOP",SWIG_From_int((int)(POLDEK_OP___MAXOP)));
  SWIG_addvarlink(SWIG_globals(),(char*)"source_TYPE_GROUP",Swig_var_source_TYPE_GROUP_get, Swig_var_source_TYPE_GROUP_set);
  SWIG_Python_SetConstant(d, "PKGSOURCE_NOAUTO",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_NOAUTOUP",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_VRFY_GPG",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_VRFY_PGP",SWIG_From_int((int)((1 << 3))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_VRFY_SIGN",SWIG_From_int((int)((1 << 4))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_TYPE",SWIG_From_int((int)((1 << 5))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_PRI",SWIG_From_int((int)((1 << 6))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_DSCR",SWIG_From_int((int)((1 << 7))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_NAMED",SWIG_From_int((int)((1 << 10))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_COMPRESS",SWIG_From_int((int)((1 << 11))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_NODESC",SWIG_From_int((int)((1 << 12))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_AUTOUPA",SWIG_From_int((int)((1 << 13))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_ISGROUP",SWIG_From_int((int)((1 << 15))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_UP",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_UPA",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_UPAUTOA",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_CLEAN",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_CLEANPKG",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_CLEANA",SWIG_From_int((int)(((1 << 0)|(1 << 1)))));
  SWIG_Python_SetConstant(d, "PKGSOURCE_CLEAN_TEST",SWIG_From_int((int)((1 << 3))));
  SWIG_Python_SetConstant(d, "PKGDIR_NAMED",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "PKGDIR_LOADED",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "PKGDIR_VERIFIED",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "PKGDIR_DIFF",SWIG_From_int((int)((1 << 3))));
  SWIG_Python_SetConstant(d, "PKGDIR_PATCHED",SWIG_From_int((int)((1 << 4))));
  SWIG_Python_SetConstant(d, "PKGDIR_UNIQED",SWIG_From_int((int)((1 << 5))));
  SWIG_Python_SetConstant(d, "PKGDIR_CHANGED",SWIG_From_int((int)((1 << 6))));
  SWIG_Python_SetConstant(d, "PKGDIR_DIFFED",SWIG_From_int((int)((1 << 7))));
  SWIG_Python_SetConstant(d, "PKGDIR_VRFY_GPG",SWIG_From_int((int)((1 << 10))));
  SWIG_Python_SetConstant(d, "PKGDIR_VRFY_PGP",SWIG_From_int((int)((1 << 11))));
  SWIG_Python_SetConstant(d, "PKGDIR_VRFYSIGN",SWIG_From_int((int)(((1 << 10)|(1 << 11)))));
  SWIG_Python_SetConstant(d, "PKGDIR_OPEN_REFRESH",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "PKGDIR_OPEN_DIFF",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "PKGDIR_OPEN_NODESC",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "PKGDIR_OPEN_ALLDESC",SWIG_From_int((int)((1 << 3))));
  SWIG_Python_SetConstant(d, "PKGDIR_LD_FULLFLIST",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "PKGDIR_LD_DESC",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "PKGDIR_LD_NOUNIQ",SWIG_From_int((int)((1 << 3))));
  SWIG_Python_SetConstant(d, "PKGDIR_LD_DOIGNORE",SWIG_From_int((int)((1 << 4))));
  SWIG_Python_SetConstant(d, "PKGDIR_LD_DIRINDEX",SWIG_From_int((int)((1 << 5))));
  SWIG_Python_SetConstant(d, "PKGDIR_LD_ALLDESC",SWIG_From_int((int)((1 << 6))));
  SWIG_Python_SetConstant(d, "PKGDIR_CREAT_NODESC",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "PKGDIR_CREAT_NOFL",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "PKGDIR_CREAT_MINi18n",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "PKGDIR_CREAT_NOUNIQ",SWIG_From_int((int)((1 << 4))));
  SWIG_Python_SetConstant(d, "PKGDIR_CREAT_NOPATCH",SWIG_From_int((int)((1 << 5))));
  SWIG_Python_SetConstant(d, "PKGDIR_CREAT_NOCOMPR",SWIG_From_int((int)((1 << 6))));
  SWIG_Python_SetConstant(d, "PKGDIR_CREAT_wRECNO",SWIG_From_int((int)((1 << 7))));
  SWIG_Python_SetConstant(d, "PKGDIR_CREAT_IFORIGCHANGED",SWIG_From_int((int)((1 << 8))));
  SWIG_Python_SetConstant(d, "PKGDIR_CREAT_v018x",SWIG_From_int((int)((1 << 9))));
  SWIG_Python_SetConstant(d, "PKGDIR_CAP_NOPREFIX",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "PKGDIR_CAP_UPDATEABLE_INC",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "PKGDIR_CAP_UPDATEABLE",SWIG_From_int((int)((1 << 2))));
  SWIG_Python_SetConstant(d, "PKGDIR_CAP_SAVEABLE",SWIG_From_int((int)((1 << 3))));
  SWIG_Python_SetConstant(d, "POCLIDEK_LOAD_AVAILABLE",SWIG_From_int((int)((1 << 0))));
  SWIG_Python_SetConstant(d, "POCLIDEK_LOAD_INSTALLED",SWIG_From_int((int)((1 << 1))));
  SWIG_Python_SetConstant(d, "POCLIDEK_LOAD_ALL",SWIG_From_int((int)(((1 << 0)|(1 << 1)))));
  SWIG_Python_SetConstant(d, "POCLIDEK_LOAD_RELOAD",SWIG_From_int((int)((1 << 5))));
#if PY_VERSION_HEX >= 0x03000000
  return m;
#else
  return;
#endif
}

