SF.net SVN: mahogany:[7577] trunk/M/src/Python

[email protected] Tue, 01 Dec 2009 17:07:27 +0000
Newsgroups gmane.mail.mahogany.cvs
Message-ID <[email protected]>
Revision: 7577
          http://mahogany.svn.sourceforge.net/mahogany/?rev=7577&view=rev
Author:   vadz
Date:     2009-12-01 17:07:26 +0000 (Tue, 01 Dec 2009)

Log Message:
-----------
Regenerate SWIG files using 1.3.40 to fix compilation with Python 2.6.

Also regenerate src/Python/Mswigpyrun.h which hadn't been updated since ages
and add a rule to do it to update-swig target in src/Python/Names.mk.

Modified Paths:
--------------
    trunk/M/src/Python/HeaderInfo.cpp-swig
    trunk/M/src/Python/HeaderInfo.py-swig
    trunk/M/src/Python/MDialogs.cpp-swig
    trunk/M/src/Python/MDialogs.py-swig
    trunk/M/src/Python/MailFolder.cpp-swig
    trunk/M/src/Python/MailFolder.py-swig
    trunk/M/src/Python/Message.cpp-swig
    trunk/M/src/Python/Message.py-swig
    trunk/M/src/Python/MimePart.cpp-swig
    trunk/M/src/Python/MimePart.py-swig
    trunk/M/src/Python/MimeType.cpp-swig
    trunk/M/src/Python/MimeType.py-swig
    trunk/M/src/Python/Mswigpyrun.h
    trunk/M/src/Python/Names.mk
    trunk/M/src/Python/SendMessage.cpp-swig
    trunk/M/src/Python/SendMessage.py-swig

Modified: trunk/M/src/Python/HeaderInfo.cpp-swig
===================================================================
--- trunk/M/src/Python/HeaderInfo.cpp-swig	2009-12-01 04:13:50 UTC (rev 7576)
+++ trunk/M/src/Python/HeaderInfo.cpp-swig	2009-12-01 17:07:26 UTC (rev 7577)
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.31
+ * 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
@@ -11,20 +11,28 @@
 #define SWIGPYTHON
 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
 
+
 #ifdef __cplusplus
-template<class T> class SwigValueWrapper {
-    T *tt;
+/* SwigValueWrapper is described in swig.swg */
+template<typename T> class SwigValueWrapper {
+  struct SwigMovePointer {
+    T *ptr;
+    SwigMovePointer(T *p) : ptr(p) { }
+    ~SwigMovePointer() { delete ptr; }
+    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
+  } pointer;
+  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
+  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
 public:
-    SwigValueWrapper() : tt(0) { }
-    SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
-    SwigValueWrapper(const T& t) : tt(new T(t)) { }
-    ~SwigValueWrapper() { delete tt; } 
-    SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
-    operator T&() const { return *tt; }
-    T *operator&() { return tt; }
-private:
-    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
+  SwigValueWrapper() : pointer(0) { }
+  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
+  operator T&() const { return *pointer.ptr; }
+  T *operator&() { return pointer.ptr; }
 };
+
+template <typename T> T SwigValueInit() {
+  return T();
+}
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -34,14 +42,14 @@
 
 /* template workaround for compilers that cannot correctly implement the C++ standard */
 #ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC)
-#   if (__SUNPRO_CC <= 0x560)
-#     define SWIGTEMPLATEDISAMBIGUATOR template
-#   else
-#     define SWIGTEMPLATEDISAMBIGUATOR 
-#   endif
+# 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 
+#  define SWIGTEMPLATEDISAMBIGUATOR
 # endif
 #endif
 
@@ -69,6 +77,12 @@
 # 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)
@@ -124,20 +138,26 @@
 # 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
 
+
+
 /* MPython.h has to appear first */
 #include <MPython.h>
 
 /* -----------------------------------------------------------------------------
  * swigrun.swg
  *
- * This file contains generic CAPI SWIG runtime support for pointer
+ * 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 "3"
+#define SWIG_RUNTIME_VERSION "4"
 
 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
 #ifdef SWIG_TYPE_TABLE
@@ -150,11 +170,11 @@
 
 /*
   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'.
+  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 is strictly necessary, ie, if you have problems
-  with your compiler or so.
+  But only do this if strictly necessary, ie, if you have problems
+  with your compiler or suchlike.
 */
 
 #ifndef SWIGRUNTIME
@@ -172,6 +192,7 @@
 
 /* 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
@@ -180,14 +201,14 @@
 /* 
    Flags/methods for returning states.
    
-   The swig conversion methods, as ConvertPtr, return and integer 
+   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 swig versions, you usually write code as:
+   In old versions of SWIG, code such as the following was usually written:
 
      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
        // success code
@@ -195,7 +216,7 @@
        //fail code
      }
 
-   Now you can be more explicit as:
+   Now you can be more explicit:
 
     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
     if (SWIG_IsOK(res)) {
@@ -204,7 +225,7 @@
       // fail code
     }
 
-   that seems to be the same, but now you can also do
+   which is the same really, but now you can also do
 
     Type *ptr;
     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
@@ -222,7 +243,7 @@
     
    I.e., now SWIG_ConvertPtr can return new objects and you can
    identify the case and take care of the deallocation. Of course that
-   requires also to SWIG_ConvertPtr to return new result values, as
+   also requires SWIG_ConvertPtr to return new result values, such as
 
       int SWIG_ConvertPtr(obj, ptr,...) {         
         if (<obj is ok>) {			       
@@ -240,7 +261,7 @@
 
    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.
+   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
@@ -254,9 +275,8 @@
       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)
@@ -281,7 +301,6 @@
 #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
@@ -304,18 +323,16 @@
 #endif
 
 
-
-
 #include <string.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-typedef void *(*swig_converter_func)(void *);
+typedef void *(*swig_converter_func)(void *, int *);
 typedef struct swig_type_info *(*swig_dycast_func)(void **);
 
-/* Structure to store inforomation on one type */
+/* 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 */
@@ -360,7 +377,7 @@
     while ((*f2 == ' ') && (f2 != l2)) ++f2;
     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
   }
-  return (l1 - f1) - (l2 - f2);
+  return (int)((l1 - f1) - (l2 - f2));
 }
 
 /*
@@ -402,48 +419,66 @@
 }
 
 
-/* think of this as a c++ template<> or a scheme macro */
-#define SWIG_TypeCheck_Template(comparison, ty)         \
-  if (ty) {                                             \
-    swig_cast_info *iter = ty->cast;                    \
-    while (iter) {                                      \
-      if (comparison) {                                 \
-        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
-
 /*
   Check the typename
 */
 SWIGRUNTIME swig_cast_info *
 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
-  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, 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;
 }
 
-/* Same as previous function, except strcmp is replaced with a pointer comparison */
+/* 
+  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 *into) {
-  SWIG_TypeCheck_Template(iter->type == from, into);
+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) {
-  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
+SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
+  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
 }
 
 /* 
@@ -714,7 +749,68 @@
 
 
 
+/* 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)
@@ -760,6 +856,7 @@
 #  define PyObject_GenericGetAttr 0
 # endif
 #endif
+
 /* Py_NotImplemented is defined in 2.1 and up. */
 #if PY_VERSION_HEX < 0x02010000
 # ifndef Py_NotImplemented
@@ -767,7 +864,6 @@
 # endif
 #endif
 
-
 /* A crude PyString_AsStringAndSize implementation for old Pythons */
 #if PY_VERSION_HEX < 0x02010000
 # ifndef PyString_AsStringAndSize
@@ -782,7 +878,6 @@
 # endif
 #endif
 
-
 /* PyBool_FromLong for old Pythons */
 #if PY_VERSION_HEX < 0x02030000
 static
@@ -860,19 +955,20 @@
 
   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", PyString_AsString(old_str), mesg);
+
+    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_Format(PyExc_RuntimeError, mesg);
+    PyErr_SetString(PyExc_RuntimeError, mesg);
   }
 }
 
-
-
 #if defined(SWIG_PYTHON_NO_THREADS)
 #  if defined(SWIG_PYTHON_THREADS)
 #    undef SWIG_PYTHON_THREADS
@@ -969,6 +1065,20 @@
   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 */
@@ -1021,7 +1131,7 @@
 
 #define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
 #define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
-#define SWIG_NewClientData(obj)                         PySwigClientData_New(obj)
+#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
 
 #define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
 #define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
@@ -1107,14 +1217,14 @@
 /* Unpack the argument tuple */
 
 SWIGINTERN int
-SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
+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 "), min);
+		   name, (min == max ? "" : "at least "), (int)min);
       return 0;
     }
   }  
@@ -1122,14 +1232,14 @@
     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
     return 0;
   } else {
-    register int l = PyTuple_GET_SIZE(args);
+    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 "), min, l);
+		   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 "), max, l);
+		   name, (min == max ? "" : "at most "), (int)max, (int)l);
       return 0;
     } else {
       register int i;
@@ -1217,7 +1327,7 @@
   return none;
 }
 
-/* PySwigClientData */
+/* SwigPyClientData */
 
 typedef struct {
   PyObject *klass;
@@ -1226,30 +1336,30 @@
   PyObject *destroy;
   int delargs;
   int implicitconv;
-} PySwigClientData;
+} SwigPyClientData;
 
 SWIGRUNTIMEINLINE int 
 SWIG_Python_CheckImplicit(swig_type_info *ty)
 {
-  PySwigClientData *data = (PySwigClientData *)ty->clientdata;
+  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
   return data ? data->implicitconv : 0;
 }
 
 SWIGRUNTIMEINLINE PyObject *
 SWIG_Python_ExceptionType(swig_type_info *desc) {
-  PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0;
+  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
   PyObject *klass = data ? data->klass : 0;
   return (klass ? klass : PyExc_RuntimeError);
 }
 
 
-SWIGRUNTIME PySwigClientData * 
-PySwigClientData_New(PyObject* obj)
+SWIGRUNTIME SwigPyClientData * 
+SwigPyClientData_New(PyObject* obj)
 {
   if (!obj) {
     return 0;
   } else {
-    PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
+    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
     /* the klass element */
     data->klass = obj;
     Py_INCREF(data->klass);
@@ -1297,14 +1407,14 @@
 }
 
 SWIGRUNTIME void 
-PySwigClientData_Del(PySwigClientData* data)
+SwigPyClientData_Del(SwigPyClientData* data)
 {
   Py_XDECREF(data->newraw);
   Py_XDECREF(data->newargs);
   Py_XDECREF(data->destroy);
 }
 
-/* =============== PySwigObject =====================*/
+/* =============== SwigPyObject =====================*/
 
 typedef struct {
   PyObject_HEAD
@@ -1312,24 +1422,28 @@
   swig_type_info *ty;
   int own;
   PyObject *next;
-} PySwigObject;
+} SwigPyObject;
 
 SWIGRUNTIME PyObject *
-PySwigObject_long(PySwigObject *v)
+SwigPyObject_long(SwigPyObject *v)
 {
   return PyLong_FromVoidPtr(v->ptr);
 }
 
 SWIGRUNTIME PyObject *
-PySwigObject_format(const char* fmt, PySwigObject *v)
+SwigPyObject_format(const char* fmt, SwigPyObject *v)
 {
   PyObject *res = NULL;
   PyObject *args = PyTuple_New(1);
   if (args) {
-    if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
-      PyObject *ofmt = PyString_FromString(fmt);
+    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);
@@ -1339,49 +1453,57 @@
 }
 
 SWIGRUNTIME PyObject *
-PySwigObject_oct(PySwigObject *v)
+SwigPyObject_oct(SwigPyObject *v)
 {
-  return PySwigObject_format("%o",v);
+  return SwigPyObject_format("%o",v);
 }
 
 SWIGRUNTIME PyObject *
-PySwigObject_hex(PySwigObject *v)
+SwigPyObject_hex(SwigPyObject *v)
 {
-  return PySwigObject_format("%x",v);
+  return SwigPyObject_format("%x",v);
 }
 
 SWIGRUNTIME PyObject *
 #ifdef METH_NOARGS
-PySwigObject_repr(PySwigObject *v)
+SwigPyObject_repr(SwigPyObject *v)
 #else
-PySwigObject_repr(PySwigObject *v, PyObject *args)
+SwigPyObject_repr(SwigPyObject *v, PyObject *args)
 #endif
 {
   const char *name = SWIG_TypePrettyName(v->ty);
-  PyObject *hex = PySwigObject_hex(v);    
-  PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
-  Py_DECREF(hex);
+  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
   if (v->next) {
 #ifdef METH_NOARGS
-    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
+    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
 #else
-    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
+    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
-PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
 {
+  char *str;
 #ifdef METH_NOARGS
-  PyObject *repr = PySwigObject_repr(v);
+  PyObject *repr = SwigPyObject_repr(v);
 #else
-  PyObject *repr = PySwigObject_repr(v, NULL);
+  PyObject *repr = SwigPyObject_repr(v, NULL);
 #endif
   if (repr) {
-    fputs(PyString_AsString(repr), fp);
+    str = SWIG_Python_str_AsChar(repr); 
+    fputs(str, fp);
+    SWIG_Python_str_DelForPy3(str);
     Py_DECREF(repr);
     return 0; 
   } else {
@@ -1390,53 +1512,71 @@
 }
 
 SWIGRUNTIME PyObject *
-PySwigObject_str(PySwigObject *v)
+SwigPyObject_str(SwigPyObject *v)
 {
   char result[SWIG_BUFFER_SIZE];
   return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
-    PyString_FromString(result) : 0;
+    SWIG_Python_str_FromChar(result) : 0;
 }
 
 SWIGRUNTIME int
-PySwigObject_compare(PySwigObject *v, PySwigObject *w)
+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*
-PySwigObject_type(void) {
+SwigPyObject_type(void) {
   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
   return type;
 }
 
 SWIGRUNTIMEINLINE int
-PySwigObject_Check(PyObject *op) {
-  return ((op)->ob_type == PySwigObject_type())
-    || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
+SwigPyObject_Check(PyObject *op) {
+  return (Py_TYPE(op) == SwigPyObject_type())
+    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
 }
 
 SWIGRUNTIME PyObject *
-PySwigObject_New(void *ptr, swig_type_info *ty, int own);
+SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
 
 SWIGRUNTIME void
-PySwigObject_dealloc(PyObject *v)
+SwigPyObject_dealloc(PyObject *v)
 {
-  PySwigObject *sobj = (PySwigObject *) v;
+  SwigPyObject *sobj = (SwigPyObject *) v;
   PyObject *next = sobj->next;
-  if (sobj->own) {
+  if (sobj->own == SWIG_POINTER_OWN) {
     swig_type_info *ty = sobj->ty;
-    PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
+    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 temporal object to carry the destroy operation */
-	PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0);
+	/* 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 {
@@ -1445,27 +1585,28 @@
 	res = ((*meth)(mself, v));
       }
       Py_XDECREF(res);
-    } else {
+    } 
+#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
+    else {
       const char *name = SWIG_TypePrettyName(ty);
-#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
-      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
+      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* 
-PySwigObject_append(PyObject* v, PyObject* next)
+SwigPyObject_append(PyObject* v, PyObject* next)
 {
-  PySwigObject *sobj = (PySwigObject *) v;
+  SwigPyObject *sobj = (SwigPyObject *) v;
 #ifndef METH_O
   PyObject *tmp = 0;
   if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
   next = tmp;
 #endif
-  if (!PySwigObject_Check(next)) {
+  if (!SwigPyObject_Check(next)) {
     return NULL;
   }
   sobj->next = next;
@@ -1475,12 +1616,12 @@
 
 SWIGRUNTIME PyObject* 
 #ifdef METH_NOARGS
-PySwigObject_next(PyObject* v)
+SwigPyObject_next(PyObject* v)
 #else
-PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
 #endif
 {
-  PySwigObject *sobj = (PySwigObject *) v;
+  SwigPyObject *sobj = (SwigPyObject *) v;
   if (sobj->next) {    
     Py_INCREF(sobj->next);
     return sobj->next;
@@ -1491,30 +1632,30 @@
 
 SWIGINTERN PyObject*
 #ifdef METH_NOARGS
-PySwigObject_disown(PyObject *v)
+SwigPyObject_disown(PyObject *v)
 #else
-PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
 #endif
 {
-  PySwigObject *sobj = (PySwigObject *)v;
+  SwigPyObject *sobj = (SwigPyObject *)v;
   sobj->own = 0;
   return SWIG_Py_Void();
 }
 
 SWIGINTERN PyObject*
 #ifdef METH_NOARGS
-PySwigObject_acquire(PyObject *v)
+SwigPyObject_acquire(PyObject *v)
 #else
-PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
+SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
 #endif
 {
-  PySwigObject *sobj = (PySwigObject *)v;
+  SwigPyObject *sobj = (SwigPyObject *)v;
   sobj->own = SWIG_POINTER_OWN;
   return SWIG_Py_Void();
 }
 
 SWIGINTERN PyObject*
-PySwigObject_own(PyObject *v, PyObject *args)
+SwigPyObject_own(PyObject *v, PyObject *args)
 {
   PyObject *val = 0;
 #if (PY_VERSION_HEX < 0x02020000)
@@ -1527,20 +1668,20 @@
     } 
   else
     {
-      PySwigObject *sobj = (PySwigObject *)v;
+      SwigPyObject *sobj = (SwigPyObject *)v;
       PyObject *obj = PyBool_FromLong(sobj->own);
       if (val) {
 #ifdef METH_NOARGS
 	if (PyObject_IsTrue(val)) {
-	  PySwigObject_acquire(v);
+	  SwigPyObject_acquire(v);
 	} else {
-	  PySwigObject_disown(v);
+	  SwigPyObject_disown(v);
 	}
 #else
 	if (PyObject_IsTrue(val)) {
-	  PySwigObject_acquire(v,args);
+	  SwigPyObject_acquire(v,args);
 	} else {
-	  PySwigObject_disown(v,args);
+	  SwigPyObject_disown(v,args);
 	}
 #endif
       } 
@@ -1551,30 +1692,30 @@
 #ifdef METH_O
 static PyMethodDef
 swigobject_methods[] = {
-  {(char *)"disown",  (PyCFunction)PySwigObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
-  {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
-  {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
-  {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_O,       (char *)"appends another 'this' object"},
-  {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
-  {(char *)"__repr__",(PyCFunction)PySwigObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
+  {(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)PySwigObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
-  {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
-  {(char *)"own",     (PyCFunction)PySwigObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
-  {(char *)"append",  (PyCFunction)PySwigObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
-  {(char *)"next",    (PyCFunction)PySwigObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
-  {(char *)"__repr__",(PyCFunction)PySwigObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
+  {(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 *
-PySwigObject_getattr(PySwigObject *sobj,char *name)
+SwigPyObject_getattr(SwigPyObject *sobj,char *name)
 {
   return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
 }
@@ -1584,11 +1725,14 @@
 _PySwigObject_type(void) {
   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
   
-  static PyNumberMethods PySwigObject_as_number = {
+  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*/
@@ -1602,45 +1746,66 @@
     0,		   /*nb_and*/
     0,		   /*nb_xor*/
     0,		   /*nb_or*/
-    (coercion)0,   /*nb_coerce*/
-    (unaryfunc)PySwigObject_long, /*nb_int*/
-    (unaryfunc)PySwigObject_long, /*nb_long*/
+#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*/
-    (unaryfunc)PySwigObject_oct,  /*nb_oct*/
-    (unaryfunc)PySwigObject_hex,  /*nb_hex*/
-#if PY_VERSION_HEX >= 0x02020000
-    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
+#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 pyswigobject_type;  
+  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 */
-	(char *)"PySwigObject",		    /* tp_name */
-	sizeof(PySwigObject),		    /* tp_basicsize */
+#endif
+	(char *)"SwigPyObject",		    /* tp_name */
+	sizeof(SwigPyObject),		    /* tp_basicsize */
 	0,			            /* tp_itemsize */
-	(destructor)PySwigObject_dealloc,   /* tp_dealloc */
-	(printfunc)PySwigObject_print,	    /* tp_print */
+	(destructor)SwigPyObject_dealloc,   /* tp_dealloc */
+	(printfunc)SwigPyObject_print,	    /* tp_print */
 #if PY_VERSION_HEX < 0x02020000
-	(getattrfunc)PySwigObject_getattr,  /* tp_getattr */ 
+	(getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
 #else
 	(getattrfunc)0,			    /* tp_getattr */ 
 #endif
 	(setattrfunc)0,			    /* tp_setattr */ 
-	(cmpfunc)PySwigObject_compare,	    /* tp_compare */ 
-	(reprfunc)PySwigObject_repr,	    /* tp_repr */    
-	&PySwigObject_as_number,	    /* tp_as_number */
+#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)PySwigObject_str,	    /* tp_str */
+	(reprfunc)SwigPyObject_str,	    /* tp_str */
 	PyObject_GenericGetAttr,            /* tp_getattro */
 	0,				    /* tp_setattro */
 	0,		                    /* tp_as_buffer */
@@ -1648,7 +1813,7 @@
 	swigobject_doc, 	            /* tp_doc */        
 	0,                                  /* tp_traverse */
 	0,                                  /* tp_clear */
-	0,                                  /* tp_richcompare */
+	(richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
 	0,                                  /* tp_weaklistoffset */
 #if PY_VERSION_HEX >= 0x02020000
 	0,                                  /* tp_iter */
@@ -1665,11 +1830,11 @@
 	0,				    /* tp_alloc */	    	
 	0,			            /* tp_new */	    	
 	0,	                            /* tp_free */	   
-        0,                                  /* tp_is_gc */  
+	0,                                  /* tp_is_gc */  
 	0,				    /* tp_bases */   
 	0,				    /* tp_mro */
 	0,				    /* tp_cache */   
- 	0,				    /* tp_subclasses */
+	0,				    /* tp_subclasses */
 	0,				    /* tp_weaklist */
 #endif
 #if PY_VERSION_HEX >= 0x02030000
@@ -1679,17 +1844,20 @@
 	0,0,0,0                             /* tp_alloc -> tp_next */
 #endif
       };
-    pyswigobject_type = tmp;
-    pyswigobject_type.ob_type = &PyType_Type;
+    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 &pyswigobject_type;
+  return &swigpyobject_type;
 }
 
 SWIGRUNTIME PyObject *
-PySwigObject_New(void *ptr, swig_type_info *ty, int own)
+SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
 {
-  PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
+  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
   if (sobj) {
     sobj->ptr  = ptr;
     sobj->ty   = ty;
@@ -1708,10 +1876,10 @@
   void *pack;
   swig_type_info *ty;
   size_t size;
-} PySwigPacked;
+} SwigPyPacked;
 
 SWIGRUNTIME int
-PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
+SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
 {
   char result[SWIG_BUFFER_SIZE];
   fputs("<Swig Packed ", fp); 
@@ -1725,29 +1893,29 @@
 }
   
 SWIGRUNTIME PyObject *
-PySwigPacked_repr(PySwigPacked *v)
+SwigPyPacked_repr(SwigPyPacked *v)
 {
   char result[SWIG_BUFFER_SIZE];
   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
-    return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
+    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
   } else {
-    return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
+    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
   }  
 }
 
 SWIGRUNTIME PyObject *
-PySwigPacked_str(PySwigPacked *v)
+SwigPyPacked_str(SwigPyPacked *v)
 {
   char result[SWIG_BUFFER_SIZE];
   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
-    return PyString_FromFormat("%s%s", result, v->ty->name);
+    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
   } else {
-    return PyString_FromString(v->ty->name);
+    return SWIG_Python_str_FromChar(v->ty->name);
   }  
 }
 
 SWIGRUNTIME int
-PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
+SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
 {
   size_t i = v->size;
   size_t j = w->size;
@@ -1758,22 +1926,22 @@
 SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
 
 SWIGRUNTIME PyTypeObject*
-PySwigPacked_type(void) {
+SwigPyPacked_type(void) {
   static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
   return type;
 }
 
 SWIGRUNTIMEINLINE int
-PySwigPacked_Check(PyObject *op) {
+SwigPyPacked_Check(PyObject *op) {
   return ((op)->ob_type == _PySwigPacked_type()) 
-    || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
+    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
 }
 
 SWIGRUNTIME void
-PySwigPacked_dealloc(PyObject *v)
+SwigPyPacked_dealloc(PyObject *v)
 {
-  if (PySwigPacked_Check(v)) {
-    PySwigPacked *sobj = (PySwigPacked *) v;
+  if (SwigPyPacked_Check(v)) {
+    SwigPyPacked *sobj = (SwigPyPacked *) v;
     free(sobj->pack);
   }
   PyObject_DEL(v);
@@ -1782,28 +1950,37 @@
 SWIGRUNTIME PyTypeObject*
 _PySwigPacked_type(void) {
   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
-  static PyTypeObject pyswigpacked_type;
+  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 */	
-	(char *)"PySwigPacked",		    /* tp_name */	
-	sizeof(PySwigPacked),		    /* tp_basicsize */	
+    0,				    /* ob_size */	
+#endif
+	(char *)"SwigPyPacked",		    /* tp_name */	
+	sizeof(SwigPyPacked),		    /* tp_basicsize */	
 	0,				    /* tp_itemsize */	
-	(destructor)PySwigPacked_dealloc,   /* tp_dealloc */	
-	(printfunc)PySwigPacked_print,	    /* tp_print */   	
+	(destructor)SwigPyPacked_dealloc,   /* tp_dealloc */	
+	(printfunc)SwigPyPacked_print,	    /* tp_print */   	
 	(getattrfunc)0,			    /* tp_getattr */ 	
 	(setattrfunc)0,			    /* tp_setattr */ 	
-	(cmpfunc)PySwigPacked_compare,	    /* tp_compare */ 	
-	(reprfunc)PySwigPacked_repr,	    /* tp_repr */    	
-	0,	                            /* tp_as_number */	
+#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)PySwigPacked_str,	    /* tp_str */	
+	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 */
@@ -1842,17 +2019,20 @@
 	0,0,0,0                             /* tp_alloc -> tp_next */
 #endif
       };
-    pyswigpacked_type = tmp;
-    pyswigpacked_type.ob_type = &PyType_Type;
+    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 &pyswigpacked_type;
+  return &swigpypacked_type;
 }
 
 SWIGRUNTIME PyObject *
-PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
+SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
 {
-  PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
+  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
   if (sobj) {
     void *pack = malloc(size);
     if (pack) {
@@ -1869,10 +2049,10 @@
 }
 
 SWIGRUNTIME swig_type_info *
-PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
+SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
 {
-  if (PySwigPacked_Check(obj)) {
-    PySwigPacked *sobj = (PySwigPacked *)obj;
+  if (SwigPyPacked_Check(obj)) {
+    SwigPyPacked *sobj = (SwigPyPacked *)obj;
     if (sobj->size != size) return 0;
     memcpy(ptr, sobj->pack, size);
     return sobj->ty;
@@ -1888,7 +2068,7 @@
 SWIGRUNTIMEINLINE PyObject *
 _SWIG_This(void)
 {
-  return PyString_FromString("this");
+    return SWIG_Python_str_FromChar("this");
 }
 
 SWIGRUNTIME PyObject *
@@ -1900,11 +2080,16 @@
 
 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
 
-SWIGRUNTIME PySwigObject *
+/* 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 (PySwigObject_Check(pyobj)) {
-    return (PySwigObject *) pyobj;
+  if (SwigPyObject_Check(pyobj)) {
+    return (SwigPyObject *) pyobj;
   } else {
     PyObject *obj = 0;
 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
@@ -1940,12 +2125,12 @@
       return 0;
     }
 #endif
-    if (obj && !PySwigObject_Check(obj)) {
+    if (obj && !SwigPyObject_Check(obj)) {
       /* a PyObject is called 'this', try to get the 'real this'
-	 PySwigObject from it */ 
+	 SwigPyObject from it */ 
       return SWIG_Python_GetSwigThis(obj);
     }
-    return (PySwigObject *)obj;
+    return (SwigPyObject *)obj;
   }
 }
 
@@ -1953,8 +2138,8 @@
 
 SWIGRUNTIME int
 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
-  if (own) {
-    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+  if (own == SWIG_POINTER_OWN) {
+    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
     if (sobj) {
       int oldown = sobj->own;
       sobj->own = own;
@@ -1973,7 +2158,9 @@
     if (ptr) *ptr = 0;
     return SWIG_OK;
   } else {
-    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
+    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
+    if (own)
+      *own = 0;
     while (sobj) {
       void *vptr = sobj->ptr;
       if (ty) {
@@ -1985,9 +2172,17 @@
 	} else {
 	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
 	  if (!tc) {
-	    sobj = (PySwigObject *)sobj->next;
+	    sobj = (SwigPyObject *)sobj->next;
 	  } else {
-	    if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
+	    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;
 	  }
 	}
@@ -1997,7 +2192,8 @@
       }
     }
     if (sobj) {
-      if (own) *own = sobj->own;
+      if (own)
+        *own = *own | sobj->own;
       if (flags & SWIG_POINTER_DISOWN) {
 	sobj->own = 0;
       }
@@ -2005,7 +2201,7 @@
     } else {
       int res = SWIG_ERROR;
       if (flags & SWIG_POINTER_IMPLICIT_CONV) {
-	PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
+	SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
 	if (data && !data->implicitconv) {
 	  PyObject *klass = data->klass;
 	  if (klass) {
@@ -2018,7 +2214,7 @@
 	      impconv = 0;
 	    }
 	    if (impconv) {
-	      PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
+	      SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
 	      if (iobj) {
 		void *vptr;
 		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
@@ -2056,14 +2252,19 @@
     /* 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) {
+    if (desc)
       desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
-      if (!desc) return SWIG_ERROR;
-    }
+    if (!desc) 
+      return SWIG_ERROR;
     if (ty) {
       swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
-      if (!tc) return SWIG_ERROR;
-      *ptr = SWIG_TypeCast(tc,vptr);
+      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;
     }
@@ -2075,7 +2276,7 @@
 
 SWIGRUNTIME int
 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
-  swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz);
+  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
   if (!to) return SWIG_ERROR;
   if (ty) {
     if (to != ty) {
@@ -2092,12 +2293,12 @@
  * ----------------------------------------------------------------------------- */
 
 /*
-  Create a new instance object, whitout calling __init__, and set the
+  Create a new instance object, without calling __init__, and set the
   'this' attribute.
 */
 
 SWIGRUNTIME PyObject* 
-SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
+SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
 {
 #if (PY_VERSION_HEX >= 0x02020000)
   PyObject *inst = 0;
@@ -2121,10 +2322,16 @@
 #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
@@ -2187,9 +2394,9 @@
   if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
     return NULL;
   } else {
-    PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
+    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
     if (sthis) {
-      PySwigObject_append((PyObject*) sthis, obj[1]);
+      SwigPyObject_append((PyObject*) sthis, obj[1]);
     } else {
       SWIG_Python_SetSwigThis(obj[0], obj[1]);
     }
@@ -2205,8 +2412,8 @@
     return SWIG_Py_Void();
   } else {
     int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
-    PyObject *robj = PySwigObject_New(ptr, type, own);
-    PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 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) {
@@ -2222,7 +2429,7 @@
 
 SWIGRUNTIMEINLINE PyObject *
 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
-  return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
+  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
 }
 
 /* -----------------------------------------------------------------------------*
@@ -2293,8 +2500,8 @@
   for (i =0; i < swig_module->size; ++i) {
     swig_type_info *ty = types[i];
     if (ty->owndata) {
-      PySwigClientData *data = (PySwigClientData *) ty->clientdata;
-      if (data) PySwigClientData_Del(data);
+      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
+      if (data) SwigPyClientData_Del(data);
     }
   }
   Py_DECREF(SWIG_This());
@@ -2304,8 +2511,13 @@
 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);
@@ -2325,7 +2537,7 @@
 SWIG_Python_TypeQuery(const char *type)
 {
   PyObject *cache = SWIG_Python_TypeCache();
-  PyObject *key = PyString_FromString(type); 
+  PyObject *key = SWIG_Python_str_FromChar(type); 
   PyObject *obj = PyDict_GetItem(cache, key);
   swig_type_info *descriptor;
   if (obj) {
@@ -2352,21 +2564,23 @@
 
 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, PyString_AsString(old_str));
+	PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
       } else {
-	PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
+	PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
       }
+      SWIG_Python_str_DelForPy3(tmp);
       Py_DECREF(old_str);
     }
     return 1;
@@ -2389,9 +2603,9 @@
 }
 
 SWIGRUNTIMEINLINE const char *
-PySwigObject_GetDesc(PyObject *self)
+SwigPyObject_GetDesc(PyObject *self)
 {
-  PySwigObject *v = (PySwigObject *)self;
+  SwigPyObject *v = (SwigPyObject *)self;
   swig_type_info *ty = v ? v->ty : 0;
   return ty ? ty->str : (char*)"";
 }
@@ -2401,10 +2615,10 @@
 {
   if (type) {
 #if defined(SWIG_COBJECT_TYPES)
-    if (obj && PySwigObject_Check(obj)) {
-      const char *otype = (const char *) PySwigObject_GetDesc(obj);
+    if (obj && SwigPyObject_Check(obj)) {
+      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
       if (otype) {
-	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
+	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
 		     type, otype);
 	return;
       }
@@ -2414,10 +2628,11 @@
       const char *otype = (obj ? obj->ob_type->tp_name : 0); 
       if (otype) {
 	PyObject *str = PyObject_Str(obj);
-	const char *cstr = str ? PyString_AsString(str) : 0;
+	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);
@@ -2439,10 +2654,12 @@
   void *result;
   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
     PyErr_Clear();
-    if (flags & SWIG_POINTER_EXCEPTION) {
+#if SWIG_POINTER_EXCEPTION
+    if (flags) {
       SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
       SWIG_Python_ArgFail(argnum);
     }
+#endif
   }
   return result;
 }
@@ -2498,11 +2715,16 @@
 /*-----------------------------------------------
               @(target):= _HeaderInfo.so
   ------------------------------------------------*/
-#define SWIG_init    init_HeaderInfo
+#if PY_VERSION_HEX >= 0x03000000
+#  define SWIG_init    PyInit__HeaderInfo
 
+#else
+#  define SWIG_init    init_HeaderInfo
+
+#endif
 #define SWIG_name    "_HeaderInfo"
 
-#define SWIGVERSION 0x010331 
+#define SWIGVERSION 0x010340 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -2514,26 +2736,28 @@
 
 
 namespace swig {
-  class PyObject_ptr {
+  class SwigPtr_PyObject {
   protected:
     PyObject *_obj;
 
   public:
-    PyObject_ptr() :_obj(0)
+    SwigPtr_PyObject() :_obj(0)
     {
     }
 
-    PyObject_ptr(const PyObject_ptr& item) : _obj(item._obj)
+    SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
     {
       Py_XINCREF(_obj);      
     }
     
-    PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj)
+    SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
     {
-      if (initial_ref) Py_XINCREF(_obj);
+      if (initial_ref) {
+        Py_XINCREF(_obj);
+      }
     }
     
-    PyObject_ptr & operator=(const PyObject_ptr& item) 
+    SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
     {
       Py_XINCREF(item._obj);
       Py_XDECREF(_obj);
@@ -2541,7 +2765,7 @@
       return *this;      
     }
     
-    ~PyObject_ptr() 
+    ~SwigPtr_PyObject() 
     {
       Py_XDECREF(_obj);
     }
@@ -2560,10 +2784,10 @@
 
 
 namespace swig {
-  struct PyObject_var : PyObject_ptr {
-    PyObject_var(PyObject* obj = 0) : PyObject_ptr(obj, false) { }
+  struct SwigVar_PyObject : SwigPtr_PyObject {
+    SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
     
-    PyObject_var & operator = (PyObject* obj)
+    SwigVar_PyObject & operator = (PyObject* obj)
     {
       Py_XDECREF(_obj);
       _obj = obj;
@@ -2724,18 +2948,11 @@
 SWIGINTERN int
 SWIG_AsVal_bool (PyObject *obj, bool *val)
 {
-  if (obj == Py_True) {
-    if (val) *val = true;
-    return SWIG_OK;
-  } else if (obj == Py_False) {
-    if (val) *val = false;
-    return SWIG_OK;
-  } else {
-    long v = 0;
-    int res = SWIG_AddCast(SWIG_AsVal_long (obj, val ? &v : 0));
-    if (SWIG_IsOK(res) && val) *val = v ? true : false;
-    return res;
-  }
+  int r = PyObject_IsTrue(obj);
+  if (r == -1)
+    return SWIG_ERROR;
+  if (val) *val = r ? true : false;
+  return SWIG_OK;
 }
 
 
@@ -2808,10 +3025,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetSubject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  String *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  String *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetSubject",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -2819,10 +3036,7 @@
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeaderInfo_GetSubject" "', argument " "1"" of type '" "HeaderInfo const *""'"); 
   }
   arg1 = reinterpret_cast< HeaderInfo * >(argp1);
-  {
-    String const &_result_ref = ((HeaderInfo const *)arg1)->GetSubject();
-    result = (String *) &_result_ref;
-  }
+  result = (String *) &((HeaderInfo const *)arg1)->GetSubject();
   resultobj = PyString_FromStringAndSize(result->data(), result->length());
   return resultobj;
 fail:
@@ -2833,10 +3047,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  String *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  String *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetFrom",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -2844,10 +3058,7 @@
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeaderInfo_GetFrom" "', argument " "1"" of type '" "HeaderInfo const *""'"); 
   }
   arg1 = reinterpret_cast< HeaderInfo * >(argp1);
-  {
-    String const &_result_ref = ((HeaderInfo const *)arg1)->GetFrom();
-    result = (String *) &_result_ref;
-  }
+  result = (String *) &((HeaderInfo const *)arg1)->GetFrom();
   resultobj = PyString_FromStringAndSize(result->data(), result->length());
   return resultobj;
 fail:
@@ -2858,10 +3069,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  String *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  String *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetTo",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -2869,10 +3080,7 @@
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeaderInfo_GetTo" "', argument " "1"" of type '" "HeaderInfo const *""'"); 
   }
   arg1 = reinterpret_cast< HeaderInfo * >(argp1);
-  {
-    String const &_result_ref = ((HeaderInfo const *)arg1)->GetTo();
-    result = (String *) &_result_ref;
-  }
+  result = (String *) &((HeaderInfo const *)arg1)->GetTo();
   resultobj = PyString_FromStringAndSize(result->data(), result->length());
   return resultobj;
 fail:
@@ -2883,10 +3091,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetNewsgroups(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  String *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  String *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetNewsgroups",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -2894,10 +3102,7 @@
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeaderInfo_GetNewsgroups" "', argument " "1"" of type '" "HeaderInfo const *""'"); 
   }
   arg1 = reinterpret_cast< HeaderInfo * >(argp1);
-  {
-    String const &_result_ref = ((HeaderInfo const *)arg1)->GetNewsgroups();
-    result = (String *) &_result_ref;
-  }
+  result = (String *) &((HeaderInfo const *)arg1)->GetNewsgroups();
   resultobj = PyString_FromStringAndSize(result->data(), result->length());
   return resultobj;
 fail:
@@ -2908,10 +3113,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetDate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  time_t result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  time_t result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetDate",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -2930,10 +3135,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  String *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  String *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetId",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -2941,10 +3146,7 @@
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeaderInfo_GetId" "', argument " "1"" of type '" "HeaderInfo const *""'"); 
   }
   arg1 = reinterpret_cast< HeaderInfo * >(argp1);
-  {
-    String const &_result_ref = ((HeaderInfo const *)arg1)->GetId();
-    result = (String *) &_result_ref;
-  }
+  result = (String *) &((HeaderInfo const *)arg1)->GetId();
   resultobj = PyString_FromStringAndSize(result->data(), result->length());
   return resultobj;
 fail:
@@ -2955,10 +3157,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetUId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  UIdType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  UIdType result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetUId",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -2977,10 +3179,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetReferences(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  String *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  String *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetReferences",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -2988,10 +3190,7 @@
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeaderInfo_GetReferences" "', argument " "1"" of type '" "HeaderInfo const *""'"); 
   }
   arg1 = reinterpret_cast< HeaderInfo * >(argp1);
-  {
-    String const &_result_ref = ((HeaderInfo const *)arg1)->GetReferences();
-    result = (String *) &_result_ref;
-  }
+  result = (String *) &((HeaderInfo const *)arg1)->GetReferences();
   resultobj = PyString_FromStringAndSize(result->data(), result->length());
   return resultobj;
 fail:
@@ -3002,10 +3201,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetInReplyTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  String *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  String *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetInReplyTo",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -3013,10 +3212,7 @@
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HeaderInfo_GetInReplyTo" "', argument " "1"" of type '" "HeaderInfo const *""'"); 
   }
   arg1 = reinterpret_cast< HeaderInfo * >(argp1);
-  {
-    String const &_result_ref = ((HeaderInfo const *)arg1)->GetInReplyTo();
-    result = (String *) &_result_ref;
-  }
+  result = (String *) &((HeaderInfo const *)arg1)->GetInReplyTo();
   resultobj = PyString_FromStringAndSize(result->data(), result->length());
   return resultobj;
 fail:
@@ -3027,10 +3223,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetStatus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  int result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  int result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetStatus",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -3049,10 +3245,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  unsigned long result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  unsigned long result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetSize",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -3071,10 +3267,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetLines(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  unsigned long result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  unsigned long result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetLines",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -3131,10 +3327,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_GetEncoding(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  wxFontEncoding result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  wxFontEncoding result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_GetEncoding",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -3153,10 +3349,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_HasEncoding(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  bool result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  bool result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_HasEncoding",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -3175,10 +3371,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfo_IsValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfo *arg1 = (HeaderInfo *) 0 ;
-  bool result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  bool result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfo_IsValid",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -3200,7 +3396,6 @@
   bool arg2 ;
   wxArrayString *arg3 = 0 ;
   String *arg4 = (String *) 0 ;
-  HeaderInfo::HeaderKind result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   bool val2 ;
@@ -3212,6 +3407,7 @@
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
+  HeaderInfo::HeaderKind result;
   
   if (!PyArg_ParseTuple(args,(char *)"OOOO:HeaderInfo_GetFromOrTo",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfo, 0 |  0 );
@@ -3260,7 +3456,6 @@
   }
   arg1 = reinterpret_cast< HeaderInfo * >(argp1);
   delete arg1;
-  
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -3270,7 +3465,7 @@
 
 SWIGINTERN PyObject *HeaderInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_HeaderInfo, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -3278,10 +3473,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfoList_Create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   MailFolder *arg1 = (MailFolder *) 0 ;
-  HeaderInfoList *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  HeaderInfoList *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfoList_Create",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MailFolder, 0 |  0 );
@@ -3300,10 +3495,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfoList_Count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfoList_Count",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3323,13 +3518,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MsgnoType arg2 ;
-  HeaderInfo *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  HeaderInfo *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_GetItemByIndex",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3362,13 +3557,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MsgnoType arg2 ;
-  HeaderInfo *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  HeaderInfo *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_GetItemByMsgno",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3401,13 +3596,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MsgnoType arg2 ;
-  HeaderInfo *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  HeaderInfo *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_GetItem",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3440,13 +3635,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   UIdType arg2 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_GetIdxFromUId",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3479,13 +3674,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   UIdType arg2 ;
-  HeaderInfo *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  HeaderInfo *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_GetEntryUId",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3517,10 +3712,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfoList_GetIdxFromMsgno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   MsgnoType arg1 ;
-  MsgnoType result;
   void *argp1 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfoList_GetIdxFromMsgno",&obj0)) SWIG_fail;
   {
@@ -3547,10 +3742,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfoList_GetMsgnoFromIdx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   MsgnoType arg1 ;
-  MsgnoType result;
   void *argp1 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfoList_GetMsgnoFromIdx",&obj0)) SWIG_fail;
   {
@@ -3578,13 +3773,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MsgnoType arg2 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_GetIdxFromPos",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3617,13 +3812,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MsgnoType arg2 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_GetPosFromIdx",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3656,13 +3851,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MsgnoType arg2 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_GetOldPosFromIdx",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3695,13 +3890,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MsgnoType arg2 ;
-  size_t result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  size_t result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_GetIndentation",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3833,7 +4028,6 @@
   MailFolder::MessageStatus arg2 ;
   bool arg3 ;
   long arg4 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
@@ -3846,6 +4040,7 @@
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"OOOO:HeaderInfoList_FindHeaderByFlag",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3889,7 +4084,6 @@
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MailFolder::MessageStatus arg2 ;
   bool arg3 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
@@ -3899,6 +4093,7 @@
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"OOO:HeaderInfoList_FindHeaderByFlag",&obj0,&obj1,&obj2)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3936,13 +4131,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MailFolder::MessageStatus arg2 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_FindHeaderByFlag",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -3977,7 +4172,7 @@
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 4); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -4040,7 +4235,11 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'HeaderInfoList_FindHeaderByFlag'.\n  Possible C/C++ prototypes are:\n    FindHeaderByFlag(MailFolder::MessageStatus,bool,long)\n    FindHeaderByFlag(MailFolder::MessageStatus,bool)\n    FindHeaderByFlag(MailFolder::MessageStatus)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'HeaderInfoList_FindHeaderByFlag'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    FindHeaderByFlag(HeaderInfoList *,MailFolder::MessageStatus,bool,long)\n"
+    "    FindHeaderByFlag(HeaderInfoList *,MailFolder::MessageStatus,bool)\n"
+    "    FindHeaderByFlag(HeaderInfoList *,MailFolder::MessageStatus)\n");
   return NULL;
 }
 
@@ -4051,7 +4250,6 @@
   MailFolder::MessageStatus arg2 ;
   bool arg3 ;
   long arg4 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
@@ -4064,6 +4262,7 @@
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
   PyObject * obj3 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"OOOO:HeaderInfoList_FindHeaderByFlagWrap",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4107,7 +4306,6 @@
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MailFolder::MessageStatus arg2 ;
   bool arg3 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
@@ -4117,6 +4315,7 @@
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"OOO:HeaderInfoList_FindHeaderByFlagWrap",&obj0,&obj1,&obj2)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4154,13 +4353,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MailFolder::MessageStatus arg2 ;
-  MsgnoType result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  MsgnoType result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_FindHeaderByFlagWrap",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4195,7 +4394,7 @@
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 4); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -4258,7 +4457,11 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'HeaderInfoList_FindHeaderByFlagWrap'.\n  Possible C/C++ prototypes are:\n    FindHeaderByFlagWrap(MailFolder::MessageStatus,bool,long)\n    FindHeaderByFlagWrap(MailFolder::MessageStatus,bool)\n    FindHeaderByFlagWrap(MailFolder::MessageStatus)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'HeaderInfoList_FindHeaderByFlagWrap'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    FindHeaderByFlagWrap(HeaderInfoList *,MailFolder::MessageStatus,bool,long)\n"
+    "    FindHeaderByFlagWrap(HeaderInfoList *,MailFolder::MessageStatus,bool)\n"
+    "    FindHeaderByFlagWrap(HeaderInfoList *,MailFolder::MessageStatus)\n");
   return NULL;
 }
 
@@ -4268,7 +4471,6 @@
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MailFolder::MessageStatus arg2 ;
   bool arg3 ;
-  MsgnoArray *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
@@ -4278,6 +4480,7 @@
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
   PyObject * obj2 = 0 ;
+  MsgnoArray *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"OOO:HeaderInfoList_GetAllHeadersByFlag",&obj0,&obj1,&obj2)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4315,13 +4518,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MailFolder::MessageStatus arg2 ;
-  MsgnoArray *result = 0 ;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  MsgnoArray *result = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_GetAllHeadersByFlag",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4356,7 +4559,7 @@
   int ii;
   
   if (!PyTuple_Check(args)) SWIG_fail;
-  argc = PyObject_Length(args);
+  argc = (int)PyObject_Length(args);
   for (ii = 0; (ii < argc) && (ii < 3); ii++) {
     argv[ii] = PyTuple_GET_ITEM(args,ii);
   }
@@ -4394,7 +4597,10 @@
   }
   
 fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'HeaderInfoList_GetAllHeadersByFlag'.\n  Possible C/C++ prototypes are:\n    GetAllHeadersByFlag(MailFolder::MessageStatus,bool)\n    GetAllHeadersByFlag(MailFolder::MessageStatus)\n");
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'HeaderInfoList_GetAllHeadersByFlag'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    GetAllHeadersByFlag(HeaderInfoList *,MailFolder::MessageStatus,bool)\n"
+    "    GetAllHeadersByFlag(HeaderInfoList *,MailFolder::MessageStatus)\n");
   return NULL;
 }
 
@@ -4403,13 +4609,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   SortParams *arg2 = 0 ;
-  bool result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  bool result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_SetSortOrder",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4437,13 +4643,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   ThreadParams *arg2 = 0 ;
-  bool result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 = 0 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  bool result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_SetThreadParameters",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4470,10 +4676,10 @@
 SWIGINTERN PyObject *_wrap_HeaderInfoList_GetLastMod(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
-  HeaderInfoList::LastMod result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   PyObject * obj0 = 0 ;
+  HeaderInfoList::LastMod result;
   
   if (!PyArg_ParseTuple(args,(char *)"O:HeaderInfoList_GetLastMod",&obj0)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4493,13 +4699,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   HeaderInfoList::LastMod arg2 ;
-  bool result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   unsigned long val2 ;
   int ecode2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  bool result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_HasChanged",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4612,13 +4818,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MsgnoType arg2 ;
-  bool result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  bool result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_IsInCache",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4651,13 +4857,13 @@
   PyObject *resultobj = 0;
   HeaderInfoList *arg1 = (HeaderInfoList *) 0 ;
   MsgnoType arg2 ;
-  bool result;
   void *argp1 = 0 ;
   int res1 = 0 ;
   void *argp2 ;
   int res2 = 0 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
+  bool result;
   
   if (!PyArg_ParseTuple(args,(char *)"OO:HeaderInfoList_ReallyGet",&obj0,&obj1)) SWIG_fail;
   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_HeaderInfoList, 0 |  0 );
@@ -4700,7 +4906,6 @@
   }
   arg1 = reinterpret_cast< HeaderInfoList * >(argp1);
   delete arg1;
-  
   resultobj = SWIG_Py_Void();
   return resultobj;
 fail:
@@ -4710,12 +4915,13 @@
 
 SWIGINTERN PyObject *HeaderInfoList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_HeaderInfoList, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
 
 static PyMethodDef SwigMethods[] = {
+	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
 	 { (char *)"new_HeaderInfo", _wrap_new_HeaderInfo, METH_VARARGS, NULL},
 	 { (char *)"HeaderInfo_GetSubject", _wrap_HeaderInfo_GetSubject, METH_VARARGS, NULL},
 	 { (char *)"HeaderInfo_GetFrom", _wrap_HeaderInfo_GetFrom, METH_VARARGS, NULL},
@@ -4771,7 +4977,7 @@
 
 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
 
-static void *_p_HeaderInfoListTo_p_MObjectRC(void *x) {
+static void *_p_HeaderInfoListTo_p_MObjectRC(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((MObjectRC *)  ((HeaderInfoList *) x));
 }
 static swig_type_info _swigt__p_HeaderInfo = {"_p_HeaderInfo", "HeaderInfo *", 0, 0, (void*)0, 0};
@@ -4916,7 +5122,7 @@
 SWIG_InitializeModule(void *clientdata) {
   size_t i;
   swig_module_info *module_head, *iter;
-  int found;
+  int found, init;
   
   clientdata = clientdata;
   
@@ -4926,6 +5132,9 @@
     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 */
@@ -4954,6 +5163,12 @@
     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);
@@ -5116,26 +5331,58 @@
   
   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;
+    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", PyString_AsString(str));
+    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
+    SWIG_Python_str_DelForPy3(tmp);
     Py_DECREF(str);
     return 0;
   }
@@ -5193,12 +5440,17 @@
     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) */ 
+        (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) */
@@ -5209,7 +5461,7 @@
         0,                                  /* tp_as_mapping */
         0,                                  /* tp_hash */
         0,                                  /* tp_call */
-        (reprfunc)swig_varlink_str,        /* tp_str */
+        (reprfunc) swig_varlink_str,        /* tp_str */
         0,                                  /* tp_getattro */
         0,                                  /* tp_setattro */
         0,                                  /* tp_as_buffer */
@@ -5230,7 +5482,10 @@
 #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;
@@ -5355,13 +5610,37 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-SWIGEXPORT void SWIG_init(void) {
-  PyObject *m, *d;
+
+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);
@@ -5372,5 +5651,10 @@
   SWIG_Python_SetConstant(d, "HeaderInfo_From",SWIG_From_int(static_cast< int >(HeaderInfo::From)));
   SWIG_Python_SetConstant(d, "HeaderInfo_To",SWIG_From_int(static_cast< int >(HeaderInfo::To)));
   SWIG_Python_SetConstant(d, "HeaderInfo_Newsgroup",SWIG_From_int(static_cast< int >(HeaderInfo::Newsgroup)));
+#if PY_VERSION_HEX >= 0x03000000
+  return m;
+#else
+  return;
+#endif
 }
 

Modified: trunk/M/src/Python/HeaderInfo.py-swig
===================================================================
--- trunk/M/src/Python/HeaderInfo.py-swig	2009-12-01 04:13:50 UTC (rev 7576)
+++ trunk/M/src/Python/HeaderInfo.py-swig	2009-12-01 17:07:26 UTC (rev 7577)
@@ -1,12 +1,32 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.31
+# Version 1.3.40
 #
-# Don't modify this file, modify the SWIG interface instead.
+# Do not make changes to this file unless you know what you are doing--modify
+# the SWIG interface file instead.
 # This file is compatible with both classic and new-style classes.
 
-import _HeaderInfo
-import new
-new_instancemethod = new.instancemethod
+from sys import version_info
+if version_info >= (2,6,0):
+    def swig_import_helper():
+        from os.path import dirname
+        import imp
+        fp = None
+        try:
+            fp, pathname, description = imp.find_module('_HeaderInfo', [dirname(__file__)])
+        except ImportError:
+            import _HeaderInfo
+            return _HeaderInfo
+        if fp is not None:
+            try:
+                _mod = imp.load_module('_HeaderInfo', fp, pathname, description)
+            finally:
+                fp.close()
+            return _mod
+    _HeaderInfo = swig_import_helper()
+    del swig_import_helper
+else:
+    import _HeaderInfo
+del version_info
 try:
     _swig_property = property
 except NameError:
@@ -14,7 +34,7 @@
 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
     if (name == "thisown"): return self.this.own(value)
     if (name == "this"):
-        if type(value).__name__ == 'PySwigObject':
+        if type(value).__name__ == 'SwigPyObject':
             self.__dict__[name] = value
             return
     method = class_type.__swig_setmethods__.get(name,None)
@@ -31,21 +51,19 @@
     if (name == "thisown"): return self.this.own()
     method = class_type.__swig_getmethods__.get(name,None)
     if method: return method(self)
-    raise AttributeError,name
+    raise AttributeError(name)
 
 def _swig_repr(self):
     try: strthis = "proxy of " + self.this.__repr__()
     except: strthis = ""
     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
 
-import types
 try:
-    _object = types.ObjectType
+    _object = object
     _newclass = 1
 except AttributeError:
     class _object : pass
     _newclass = 0
-del types
 
 
 class HeaderInfo(_object):
@@ -54,26 +72,26 @@
     __swig_getmethods__ = {}
     __getattr__ = lambda self, name: _swig_getattr(self, HeaderInfo, name)
     __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _HeaderInfo.new_HeaderInfo(*args)
+    def __init__(self): 
+        this = _HeaderInfo.new_HeaderInfo()
         try: self.this.append(this)
         except: self.this = this
-    def GetSubject(*args): return _HeaderInfo.HeaderInfo_GetSubject(*args)
-    def GetFrom(*args): return _HeaderInfo.HeaderInfo_GetFrom(*args)
-    def GetTo(*args): return _HeaderInfo.HeaderInfo_GetTo(*args)
-    def GetNewsgroups(*args): return _HeaderInfo.HeaderInfo_GetNewsgroups(*args)
-    def GetDate(*args): return _HeaderInfo.HeaderInfo_GetDate(*args)
-    def GetId(*args): return _HeaderInfo.HeaderInfo_GetId(*args)
-    def GetUId(*args): return _HeaderInfo.HeaderInfo_GetUId(*args)
-    def GetReferences(*args): return _HeaderInfo.HeaderInfo_GetReferences(*args)
-    def GetInReplyTo(*args): return _HeaderInfo.HeaderInfo_GetInReplyTo(*args)
-    def GetStatus(*args): return _HeaderInfo.HeaderInfo_GetStatus(*args)
-    def GetSize(*args): return _HeaderInfo.HeaderInfo_GetSize(*args)
-    def GetLines(*args): return _HeaderInfo.HeaderInfo_GetLines(*args)
-    def SetEncoding(*args): return _HeaderInfo.HeaderInfo_SetEncoding(*args)
-    def GetEncoding(*args): return _HeaderInfo.HeaderInfo_GetEncoding(*args)
-    def HasEncoding(*args): return _HeaderInfo.HeaderInfo_HasEncoding(*args)
-    def IsValid(*args): return _HeaderInfo.HeaderInfo_IsValid(*args)
+    def GetSubject(self): return _HeaderInfo.HeaderInfo_GetSubject(self)
+    def GetFrom(self): return _HeaderInfo.HeaderInfo_GetFrom(self)
+    def GetTo(self): return _HeaderInfo.HeaderInfo_GetTo(self)
+    def GetNewsgroups(self): return _HeaderInfo.HeaderInfo_GetNewsgroups(self)
+    def GetDate(self): return _HeaderInfo.HeaderInfo_GetDate(self)
+    def GetId(self): return _HeaderInfo.HeaderInfo_GetId(self)
+    def GetUId(self): return _HeaderInfo.HeaderInfo_GetUId(self)
+    def GetReferences(self): return _HeaderInfo.HeaderInfo_GetReferences(self)
+    def GetInReplyTo(self): return _HeaderInfo.HeaderInfo_GetInReplyTo(self)
+    def GetStatus(self): return _HeaderInfo.HeaderInfo_GetStatus(self)
+    def GetSize(self): return _HeaderInfo.HeaderInfo_GetSize(self)
+    def GetLines(self): return _HeaderInfo.HeaderInfo_GetLines(self)
+    def SetEncoding(self, *args): return _HeaderInfo.HeaderInfo_SetEncoding(self, *args)
+    def GetEncoding(self): return _HeaderInfo.HeaderInfo_GetEncoding(self)
+    def HasEncoding(self): return _HeaderInfo.HeaderInfo_HasEncoding(self)
+    def IsValid(self): return _HeaderInfo.HeaderInfo_IsValid(self)
     Invalid = _HeaderInfo.HeaderInfo_Invalid
     From = _HeaderInfo.HeaderInfo_From
     To = _HeaderInfo.HeaderInfo_To
@@ -84,6 +102,9 @@
     __del__ = lambda self : None;
 HeaderInfo_swigregister = _HeaderInfo.HeaderInfo_swigregister
 HeaderInfo_swigregister(HeaderInfo)
+
+def HeaderInfo_GetFromOrTo(*args):
+  return _HeaderInfo.HeaderInfo_GetFromOrTo(*args)
 HeaderInfo_GetFromOrTo = _HeaderInfo.HeaderInfo_GetFromOrTo
 
 class HeaderInfoList(_object):
@@ -91,44 +112,53 @@
     __setattr__ = lambda self, name, value: _swig_setattr(self, HeaderInfoList, name, value)
     __swig_getmethods__ = {}
     __getattr__ = lambda self, name: _swig_getattr(self, HeaderInfoList, name)
-    def __init__(self): raise AttributeError, "No constructor defined"
+    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
     __repr__ = _swig_repr
     __swig_getmethods__["Create"] = lambda x: _HeaderInfo.HeaderInfoList_Create
     if _newclass:Create = staticmethod(_HeaderInfo.HeaderInfoList_Create)
-    def Count(*args): return _HeaderInfo.HeaderInfoList_Count(*args)
-    def GetItemByIndex(*args): return _HeaderInfo.HeaderInfoList_GetItemByIndex(*args)
-    def GetItemByMsgno(*args): return _HeaderInfo.HeaderInfoList_GetItemByMsgno(*args)
-    def GetItem(*args): return _HeaderInfo.HeaderInfoList_GetItem(*args)
-    def GetIdxFromUId(*args): return _HeaderInfo.HeaderInfoList_GetIdxFromUId(*args)
-    def GetEntryUId(*args): return _HeaderInfo.HeaderInfoList_GetEntryUId(*args)
+    def Count(self): return _HeaderInfo.HeaderInfoList_Count(self)
+    def GetItemByIndex(self, *args): return _HeaderInfo.HeaderInfoList_GetItemByIndex(self, *args)
+    def GetItemByMsgno(self, *args): return _HeaderInfo.HeaderInfoList_GetItemByMsgno(self, *args)
+    def GetItem(self, *args): return _HeaderInfo.HeaderInfoList_GetItem(self, *args)
+    def GetIdxFromUId(self, *args): return _HeaderInfo.HeaderInfoList_GetIdxFromUId(self, *args)
+    def GetEntryUId(self, *args): return _HeaderInfo.HeaderInfoList_GetEntryUId(self, *args)
     __swig_getmethods__["GetIdxFromMsgno"] = lambda x: _HeaderInfo.HeaderInfoList_GetIdxFromMsgno
     if _newclass:GetIdxFromMsgno = staticmethod(_HeaderInfo.HeaderInfoList_GetIdxFromMsgno)
     __swig_getmethods__["GetMsgnoFromIdx"] = lambda x: _HeaderInfo.HeaderInfoList_GetMsgnoFromIdx
     if _newclass:GetMsgnoFromIdx = staticmethod(_HeaderInfo.HeaderInfoList_GetMsgnoFromIdx)
-    def GetIdxFromPos(*args): return _HeaderInfo.HeaderInfoList_GetIdxFromPos(*args)
-    def GetPosFromIdx(*args): return _HeaderInfo.HeaderInfoList_GetPosFromIdx(*args)
-    def GetOldPosFromIdx(*args): return _HeaderInfo.HeaderInfoList_GetOldPosFromIdx(*args)
-    def GetIndentation(*args): return _HeaderInfo.HeaderInfoList_GetIndentation(*args)
-    def OnRemove(*args): return _HeaderInfo.HeaderInfoList_OnRemove(*args)
-    def OnAdd(*args): return _HeaderInfo.HeaderInfoList_OnAdd(*args)
-    def OnClose(*args): return _HeaderInfo.HeaderInfoList_OnClose(*args)
-    def FindHeaderByFlag(*args): return _HeaderInfo.HeaderInfoList_FindHeaderByFlag(*args)
-    def FindHeaderByFlagWrap(*args): return _HeaderInfo.HeaderInfoList_FindHeaderByFlagWrap(*args)
-    def GetAllHeadersByFlag(*args): return _HeaderInfo.HeaderInfoList_GetAllHeadersByFlag(*args)
-    def SetSortOrder(*args): return _HeaderInfo.HeaderInfoList_SetSortOrder(*args)
-    def SetThreadParameters(*args): return _HeaderInfo.HeaderInfoList_SetThreadParameters(*args)
-    def GetLastMod(*args): return _HeaderInfo.HeaderInfoList_GetLastMod(*args)
-    def HasChanged(*args): return _HeaderInfo.HeaderInfoList_HasChanged(*args)
-    def CachePositions(*args): return _HeaderInfo.HeaderInfoList_CachePositions(*args)
-    def CacheMsgnos(*args): return _HeaderInfo.HeaderInfoList_CacheMsgnos(*args)
-    def IsInCache(*args): return _HeaderInfo.HeaderInfoList_IsInCache(*args)
-    def ReallyGet(*args): return _HeaderInfo.HeaderInfoList_ReallyGet(*args)
+    def GetIdxFromPos(self, *args): return _HeaderInfo.HeaderInfoList_GetIdxFromPos(self, *args)
+    def GetPosFromIdx(self, *args): return _HeaderInfo.HeaderInfoList_GetPosFromIdx(self, *args)
+    def GetOldPosFromIdx(self, *args): return _HeaderInfo.HeaderInfoList_GetOldPosFromIdx(self, *args)
+    def GetIndentation(self, *args): return _HeaderInfo.HeaderInfoList_GetIndentation(self, *args)
+    def OnRemove(self, *args): return _HeaderInfo.HeaderInfoList_OnRemove(self, *args)
+    def OnAdd(self, *args): return _HeaderInfo.HeaderInfoList_OnAdd(self, *args)
+    def OnClose(self): return _HeaderInfo.HeaderInfoList_OnClose(self)
+    def FindHeaderByFlag(self, *args): return _HeaderInfo.HeaderInfoList_FindHeaderByFlag(self, *args)
+    def FindHeaderByFlagWrap(self, *args): return _HeaderInfo.HeaderInfoList_FindHeaderByFlagWrap(self, *args)
+    def GetAllHeadersByFlag(self, *args): return _HeaderInfo.HeaderInfoList_GetAllHeadersByFlag(self, *args)
+    def SetSortOrder(self, *args): return _HeaderInfo.HeaderInfoList_SetSortOrder(self, *args)
+    def SetThreadParameters(self, *args): return _HeaderInfo.HeaderInfoList_SetThreadParameters(self, *args)
+    def GetLastMod(self): return _HeaderInfo.HeaderInfoList_GetLastMod(self)
+    def HasChanged(self, *args): return _HeaderInfo.HeaderInfoList_HasChanged(self, *args)
+    def CachePositions(self, *args): return _HeaderInfo.HeaderInfoList_CachePositions(self, *args)
+    def CacheMsgnos(self, *args): return _HeaderInfo.HeaderInfoList_CacheMsgnos(self, *args)
+    def IsInCache(self, *args): return _HeaderInfo.HeaderInfoList_IsInCache(self, *args)
+    def ReallyGet(self, *args): return _HeaderInfo.HeaderInfoList_ReallyGet(self, *args)
     __swig_destroy__ = _HeaderInfo.delete_HeaderInfoList
     __del__ = lambda self : None;
 HeaderInfoList_swigregister = _HeaderInfo.HeaderInfoList_swigregister
 HeaderInfoList_swigregister(HeaderInfoList)
+
+def HeaderInfoList_Create(*args):
+  return _HeaderInfo.HeaderInfoList_Create(*args)
 HeaderInfoList_Create = _HeaderInfo.HeaderInfoList_Create
+
+def HeaderInfoList_GetIdxFromMsgno(*args):
+  return _HeaderInfo.HeaderInfoList_GetIdxFromMsgno(*args)
 HeaderInfoList_GetIdxFromMsgno = _HeaderInfo.HeaderInfoList_GetIdxFromMsgno
+
+def HeaderInfoList_GetMsgnoFromIdx(*args):
+  return _HeaderInfo.HeaderInfoList_GetMsgnoFromIdx(*args)
 HeaderInfoList_GetMsgnoFromIdx = _HeaderInfo.HeaderInfoList_GetMsgnoFromIdx
 
 

Modified: trunk/M/src/Python/MDialogs.cpp-swig
===================================================================
--- trunk/M/src/Python/MDialogs.cpp-swig	2009-12-01 04:13:50 UTC (rev 7576)
+++ trunk/M/src/Python/MDialogs.cpp-swig	2009-12-01 17:07:26 UTC (rev 7577)
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.31
+ * 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
@@ -11,20 +11,28 @@
 #define SWIGPYTHON
 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
 
+
 #ifdef __cplusplus
-template<class T> class SwigValueWrapper {
-    T *tt;
+/* SwigValueWrapper is described in swig.swg */
+template<typename T> class SwigValueWrapper {
+  struct SwigMovePointer {
+    T *ptr;
+    SwigMovePointer(T *p) : ptr(p) { }
+    ~SwigMovePointer() { delete ptr; }
+    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
+  } pointer;
+  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
+  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
 public:
-    SwigValueWrapper() : tt(0) { }
-    SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
-    SwigValueWrapper(const T& t) : tt(new T(t)) { }
-    ~SwigValueWrapper() { delete tt; } 
-    SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
-    operator T&() const { return *tt; }
-    T *operator&() { return tt; }
-private:
-    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
+  SwigValueWrapper() : pointer(0) { }
+  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
+  operator T&() const { return *pointer.ptr; }
+  T *operator&() { return pointer.ptr; }
 };
+
+template <typename T> T SwigValueInit() {
+  return T();
+}
 #endif
 
 /* -----------------------------------------------------------------------------

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev