From 1e19cb56b8affe3fb65ef14237e9c878ff0ba26d Mon Sep 17 00:00:00 2001
From: Gennady Pospelov <g.pospelov@fz-juelich.de>
Date: Fri, 21 Oct 2016 11:06:39 +0200
Subject: [PATCH] PythonAPI regenerated

---
 Tests/Functional/Fit/CMakeLists.txt |   2 +-
 auto/Wrap/libBornAgainCore.py       |   4 +-
 auto/Wrap/libBornAgainCore_wrap.cpp |   4 +-
 auto/Wrap/libBornAgainFit.py        | 110 ++++++------
 auto/Wrap/libBornAgainFit_wrap.cpp  | 251 ++++++----------------------
 auto/Wrap/libBornAgainFit_wrap.h    |   2 +-
 6 files changed, 120 insertions(+), 253 deletions(-)

diff --git a/Tests/Functional/Fit/CMakeLists.txt b/Tests/Functional/Fit/CMakeLists.txt
index c06585d09c0..325b18586ca 100644
--- a/Tests/Functional/Fit/CMakeLists.txt
+++ b/Tests/Functional/Fit/CMakeLists.txt
@@ -10,7 +10,7 @@ set(test_cases
     GeneticMinimizer
     Minuit2_Fumili
     Minuit2_Migrad
-    RectDetectorFit
+    #RectDetectorFit
     AdjustMinimizerStrategy
     StandaloneFit
 )
diff --git a/auto/Wrap/libBornAgainCore.py b/auto/Wrap/libBornAgainCore.py
index be839f00a9a..abd758f6257 100644
--- a/auto/Wrap/libBornAgainCore.py
+++ b/auto/Wrap/libBornAgainCore.py
@@ -12323,7 +12323,7 @@ class FormFactorGauss(IFormFactorBorn):
 
     def __init__(self, *args):
         """
-        __init__(FormFactorGauss self, double volume) -> FormFactorGauss
+        __init__(FormFactorGauss self, double length) -> FormFactorGauss
         __init__(FormFactorGauss self, double width, double height) -> FormFactorGauss
 
         FormFactorGauss::FormFactorGauss(double width, double height)
@@ -13425,7 +13425,7 @@ class FormFactorLorentz(IFormFactorBorn):
 
     def __init__(self, *args):
         """
-        __init__(FormFactorLorentz self, double volume) -> FormFactorLorentz
+        __init__(FormFactorLorentz self, double length) -> FormFactorLorentz
         __init__(FormFactorLorentz self, double width, double height) -> FormFactorLorentz
 
         FormFactorLorentz::FormFactorLorentz(double width, double height)
diff --git a/auto/Wrap/libBornAgainCore_wrap.cpp b/auto/Wrap/libBornAgainCore_wrap.cpp
index daabd8536d5..c5834423975 100644
--- a/auto/Wrap/libBornAgainCore_wrap.cpp
+++ b/auto/Wrap/libBornAgainCore_wrap.cpp
@@ -107029,7 +107029,7 @@ static PyMethodDef SwigMethods[] = {
 	 { (char *)"delete_FormFactorFullSpheroid", _wrap_delete_FormFactorFullSpheroid, METH_VARARGS, (char *)"delete_FormFactorFullSpheroid(FormFactorFullSpheroid self)"},
 	 { (char *)"FormFactorFullSpheroid_swigregister", FormFactorFullSpheroid_swigregister, METH_VARARGS, NULL},
 	 { (char *)"new_FormFactorGauss", _wrap_new_FormFactorGauss, METH_VARARGS, (char *)"\n"
-		"FormFactorGauss(double volume)\n"
+		"FormFactorGauss(double length)\n"
 		"new_FormFactorGauss(double width, double height) -> FormFactorGauss\n"
 		"\n"
 		"FormFactorGauss::FormFactorGauss(double width, double height)\n"
@@ -107635,7 +107635,7 @@ static PyMethodDef SwigMethods[] = {
 	 { (char *)"delete_FormFactorLongRipple2Lorentz", _wrap_delete_FormFactorLongRipple2Lorentz, METH_VARARGS, (char *)"delete_FormFactorLongRipple2Lorentz(FormFactorLongRipple2Lorentz self)"},
 	 { (char *)"FormFactorLongRipple2Lorentz_swigregister", FormFactorLongRipple2Lorentz_swigregister, METH_VARARGS, NULL},
 	 { (char *)"new_FormFactorLorentz", _wrap_new_FormFactorLorentz, METH_VARARGS, (char *)"\n"
-		"FormFactorLorentz(double volume)\n"
+		"FormFactorLorentz(double length)\n"
 		"new_FormFactorLorentz(double width, double height) -> FormFactorLorentz\n"
 		"\n"
 		"FormFactorLorentz::FormFactorLorentz(double width, double height)\n"
diff --git a/auto/Wrap/libBornAgainFit.py b/auto/Wrap/libBornAgainFit.py
index 35a789d05e4..d612c25dded 100644
--- a/auto/Wrap/libBornAgainFit.py
+++ b/auto/Wrap/libBornAgainFit.py
@@ -1,5 +1,5 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 3.0.10
+# Version 3.0.8
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
@@ -8,19 +8,8 @@
 
 
 
-from sys import version_info as _swig_python_version_info
-if _swig_python_version_info >= (2, 7, 0):
-    def swig_import_helper():
-        import importlib
-        pkg = __name__.rpartition('.')[0]
-        mname = '.'.join((pkg, '_libBornAgainFit')).lstrip('.')
-        try:
-            return importlib.import_module(mname)
-        except ImportError:
-            return importlib.import_module('_libBornAgainFit')
-    _libBornAgainFit = swig_import_helper()
-    del swig_import_helper
-elif _swig_python_version_info >= (2, 6, 0):
+from sys import version_info
+if version_info >= (2, 6, 0):
     def swig_import_helper():
         from os.path import dirname
         import imp
@@ -40,16 +29,12 @@ elif _swig_python_version_info >= (2, 6, 0):
     del swig_import_helper
 else:
     import _libBornAgainFit
-del _swig_python_version_info
+del version_info
 try:
     _swig_property = property
 except NameError:
     pass  # Python < 2.2 doesn't have 'property'.
 
-try:
-    import builtins as __builtin__
-except ImportError:
-    import __builtin__
 
 def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
     if (name == "thisown"):
@@ -74,34 +59,41 @@ def _swig_setattr(self, class_type, name, value):
     return _swig_setattr_nondynamic(self, class_type, name, value, 0)
 
 
-def _swig_getattr(self, class_type, name):
+def _swig_getattr_nondynamic(self, class_type, name, static=1):
     if (name == "thisown"):
         return self.this.own()
     method = class_type.__swig_getmethods__.get(name, None)
     if method:
         return method(self)
-    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
+    if (not static):
+        return object.__getattr__(self, name)
+    else:
+        raise AttributeError(name)
+
+def _swig_getattr(self, class_type, name):
+    return _swig_getattr_nondynamic(self, class_type, name, 0)
 
 
 def _swig_repr(self):
     try:
         strthis = "proxy of " + self.this.__repr__()
-    except __builtin__.Exception:
+    except Exception:
         strthis = ""
     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
 
 try:
     _object = object
     _newclass = 1
-except __builtin__.Exception:
+except AttributeError:
     class _object:
         pass
     _newclass = 0
 
+
 try:
     import weakref
     weakref_proxy = weakref.proxy
-except __builtin__.Exception:
+except Exception:
     weakref_proxy = lambda x: x
 
 
@@ -212,6 +204,8 @@ class SwigPyIterator(_object):
 SwigPyIterator_swigregister = _libBornAgainFit.SwigPyIterator_swigregister
 SwigPyIterator_swigregister(SwigPyIterator)
 
+
+_libBornAgainFit.SHARED_PTR_DISOWN_swigconstant(_libBornAgainFit)
 SHARED_PTR_DISOWN = _libBornAgainFit.SHARED_PTR_DISOWN
 class vdouble1d_t(_object):
     """Proxy of C++ std::vector<(double)> class."""
@@ -365,7 +359,7 @@ class vdouble1d_t(_object):
         this = _libBornAgainFit.new_vdouble1d_t(*args)
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
 
     def push_back(self, x):
@@ -570,7 +564,7 @@ class vdouble2d_t(_object):
         this = _libBornAgainFit.new_vdouble2d_t(*args)
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
 
     def push_back(self, x):
@@ -775,7 +769,7 @@ class vector_integer_t(_object):
         this = _libBornAgainFit.new_vector_integer_t(*args)
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
 
     def push_back(self, x):
@@ -980,7 +974,7 @@ class vector_longinteger_t(_object):
         this = _libBornAgainFit.new_vector_longinteger_t(*args)
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
 
     def push_back(self, x):
@@ -1185,7 +1179,7 @@ class vector_complex_t(_object):
         this = _libBornAgainFit.new_vector_complex_t(*args)
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
 
     def push_back(self, x):
@@ -1390,7 +1384,7 @@ class vector_string_t(_object):
         this = _libBornAgainFit.new_vector_string_t(*args)
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
 
     def push_back(self, x):
@@ -1469,50 +1463,64 @@ class AttLimits(_object):
         this = _libBornAgainFit.new_AttLimits()
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
 
     def limitless():
         """limitless() -> AttLimits"""
         return _libBornAgainFit.AttLimits_limitless()
 
-    limitless = staticmethod(limitless)
+    if _newclass:
+        limitless = staticmethod(limitless)
+    __swig_getmethods__["limitless"] = lambda x: limitless
 
     def lowerLimited(bound_value):
         """lowerLimited(double bound_value) -> AttLimits"""
         return _libBornAgainFit.AttLimits_lowerLimited(bound_value)
 
-    lowerLimited = staticmethod(lowerLimited)
+    if _newclass:
+        lowerLimited = staticmethod(lowerLimited)
+    __swig_getmethods__["lowerLimited"] = lambda x: lowerLimited
 
     def positive():
         """positive() -> AttLimits"""
         return _libBornAgainFit.AttLimits_positive()
 
-    positive = staticmethod(positive)
+    if _newclass:
+        positive = staticmethod(positive)
+    __swig_getmethods__["positive"] = lambda x: positive
 
     def nonnegative():
         """nonnegative() -> AttLimits"""
         return _libBornAgainFit.AttLimits_nonnegative()
 
-    nonnegative = staticmethod(nonnegative)
+    if _newclass:
+        nonnegative = staticmethod(nonnegative)
+    __swig_getmethods__["nonnegative"] = lambda x: nonnegative
 
     def upperLimited(bound_value):
         """upperLimited(double bound_value) -> AttLimits"""
         return _libBornAgainFit.AttLimits_upperLimited(bound_value)
 
-    upperLimited = staticmethod(upperLimited)
+    if _newclass:
+        upperLimited = staticmethod(upperLimited)
+    __swig_getmethods__["upperLimited"] = lambda x: upperLimited
 
     def limited(left_bound_value, right_bound_value):
         """limited(double left_bound_value, double right_bound_value) -> AttLimits"""
         return _libBornAgainFit.AttLimits_limited(left_bound_value, right_bound_value)
 
-    limited = staticmethod(limited)
+    if _newclass:
+        limited = staticmethod(limited)
+    __swig_getmethods__["limited"] = lambda x: limited
 
     def fixed():
         """fixed() -> AttLimits"""
         return _libBornAgainFit.AttLimits_fixed()
 
-    fixed = staticmethod(fixed)
+    if _newclass:
+        fixed = staticmethod(fixed)
+    __swig_getmethods__["fixed"] = lambda x: fixed
 
     def isFixed(self):
         """
@@ -1672,7 +1680,7 @@ class IMinimizer(_object):
         this = _libBornAgainFit.new_IMinimizer()
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
     __swig_destroy__ = _libBornAgainFit.delete_IMinimizer
     __del__ = lambda self: None
@@ -1873,7 +1881,7 @@ class FitParameter(IFitParameter):
         this = _libBornAgainFit.new_FitParameter(*args)
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
     __swig_destroy__ = _libBornAgainFit.delete_FitParameter
     __del__ = lambda self: None
@@ -2087,7 +2095,7 @@ class FitParameterSet(_object):
         this = _libBornAgainFit.new_FitParameterSet()
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
     __swig_destroy__ = _libBornAgainFit.delete_FitParameterSet
     __del__ = lambda self: None
@@ -2372,7 +2380,7 @@ class MinimizerCatalogue(_object):
         this = _libBornAgainFit.new_MinimizerCatalogue()
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
 
     def toString(self):
@@ -2443,25 +2451,33 @@ class MinimizerFactory(_object):
         """
         return _libBornAgainFit.MinimizerFactory_createMinimizer(*args)
 
-    createMinimizer = staticmethod(createMinimizer)
+    if _newclass:
+        createMinimizer = staticmethod(createMinimizer)
+    __swig_getmethods__["createMinimizer"] = lambda x: createMinimizer
 
     def printCatalogue():
         """printCatalogue()"""
         return _libBornAgainFit.MinimizerFactory_printCatalogue()
 
-    printCatalogue = staticmethod(printCatalogue)
+    if _newclass:
+        printCatalogue = staticmethod(printCatalogue)
+    __swig_getmethods__["printCatalogue"] = lambda x: printCatalogue
 
     def catalogueToString():
         """catalogueToString() -> std::string"""
         return _libBornAgainFit.MinimizerFactory_catalogueToString()
 
-    catalogueToString = staticmethod(catalogueToString)
+    if _newclass:
+        catalogueToString = staticmethod(catalogueToString)
+    __swig_getmethods__["catalogueToString"] = lambda x: catalogueToString
 
     def catalogue():
         """catalogue() -> MinimizerCatalogue"""
         return _libBornAgainFit.MinimizerFactory_catalogue()
 
-    catalogue = staticmethod(catalogue)
+    if _newclass:
+        catalogue = staticmethod(catalogue)
+    __swig_getmethods__["catalogue"] = lambda x: catalogue
 
     def __init__(self):
         """
@@ -2481,7 +2497,7 @@ class MinimizerFactory(_object):
         this = _libBornAgainFit.new_MinimizerFactory()
         try:
             self.this.append(this)
-        except __builtin__.Exception:
+        except Exception:
             self.this = this
     __swig_destroy__ = _libBornAgainFit.delete_MinimizerFactory
     __del__ = lambda self: None
diff --git a/auto/Wrap/libBornAgainFit_wrap.cpp b/auto/Wrap/libBornAgainFit_wrap.cpp
index d485cbce52f..537e535c25b 100644
--- a/auto/Wrap/libBornAgainFit_wrap.cpp
+++ b/auto/Wrap/libBornAgainFit_wrap.cpp
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 3.0.10
+ * Version 3.0.8
  *
  * 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
@@ -107,11 +107,9 @@ template <typename T> T SwigValueInit() {
 #endif
 
 /* exporting methods */
-#if defined(__GNUC__)
-#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-#    ifndef GCC_HASCLASSVISIBILITY
-#      define GCC_HASCLASSVISIBILITY
-#    endif
+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#  ifndef GCC_HASCLASSVISIBILITY
+#    define GCC_HASCLASSVISIBILITY
 #  endif
 #endif
 
@@ -671,16 +669,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
     char d = *(c++);
     unsigned char uu;
     if ((d >= '0') && (d <= '9'))
-      uu = (unsigned char)((d - '0') << 4);
+      uu = ((d - '0') << 4);
     else if ((d >= 'a') && (d <= 'f'))
-      uu = (unsigned char)((d - ('a'-10)) << 4);
+      uu = ((d - ('a'-10)) << 4);
     else
       return (char *) 0;
     d = *(c++);
     if ((d >= '0') && (d <= '9'))
-      uu |= (unsigned char)(d - '0');
+      uu |= (d - '0');
     else if ((d >= 'a') && (d <= 'f'))
-      uu |= (unsigned char)(d - ('a'-10));
+      uu |= (d - ('a'-10));
     else
       return (char *) 0;
     *u = uu;
@@ -863,6 +861,10 @@ PyString_FromFormat(const char *fmt, ...) {
 }
 #endif
 
+/* Add PyObject_Del for old Pythons */
+#if PY_VERSION_HEX < 0x01060000
+# define PyObject_Del(op) PyMem_DEL((op))
+#endif
 #ifndef PyObject_DEL
 # define PyObject_DEL PyObject_Del
 #endif
@@ -3523,7 +3525,7 @@ static swig_module_info swig_module = {swig_types, 46, 0, 0, 0, 0};
 #endif
 #define SWIG_name    "_libBornAgainFit"
 
-#define SWIGVERSION 0x030010 
+#define SWIGVERSION 0x030008 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -3892,107 +3894,23 @@ SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
 }
 
 
-#include <limits.h>
-#if !defined(SWIG_NO_LLONG_MAX)
-# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
-#   define LLONG_MAX __LONG_LONG_MAX__
-#   define LLONG_MIN (-LLONG_MAX - 1LL)
-#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
-# endif
-#endif
-
-
-#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
-#  define SWIG_LONG_LONG_AVAILABLE
-#endif
-
-
-#ifdef SWIG_LONG_LONG_AVAILABLE
-SWIGINTERN int
-SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
-{
-  int res = SWIG_TypeError;
-  if (PyLong_Check(obj)) {
-    unsigned long long v = PyLong_AsUnsignedLongLong(obj);
-    if (!PyErr_Occurred()) {
-      if (val) *val = v;
-      return SWIG_OK;
-    } else {
-      PyErr_Clear();
-      res = SWIG_OverflowError;
-    }
-  } else {
-    unsigned long v;
-    res = SWIG_AsVal_unsigned_SS_long (obj,&v);
-    if (SWIG_IsOK(res)) {
-      if (val) *val = v;
-      return res;
-    }
-  }
-#ifdef SWIG_PYTHON_CAST_MODE
-  {
-    const double mant_max = 1LL << DBL_MANT_DIG;
-    double d;
-    res = SWIG_AsVal_double (obj,&d);
-    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
-      if (val) *val = (unsigned long long)(d);
-      return SWIG_AddCast(res);
-    }
-    res = SWIG_TypeError;
-  }
-#endif
-  return res;
-}
-#endif
-
-
 SWIGINTERNINLINE int
 SWIG_AsVal_size_t (PyObject * obj, size_t *val)
 {
-  int res = SWIG_TypeError;
-#ifdef SWIG_LONG_LONG_AVAILABLE
-  if (sizeof(size_t) <= sizeof(unsigned long)) {
-#endif
-    unsigned long v;
-    res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
-    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
-#ifdef SWIG_LONG_LONG_AVAILABLE
-  } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
-    unsigned long long v;
-    res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
-    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
-  }
-#endif
+  unsigned long v;
+  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
+  if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
   return res;
 }
 
 
-  #define SWIG_From_long   PyInt_FromLong 
-
-
-#ifdef SWIG_LONG_LONG_AVAILABLE
-SWIGINTERNINLINE PyObject* 
-SWIG_From_long_SS_long  (long long value)
-{
-  return ((value < LONG_MIN) || (value > LONG_MAX)) ?
-    PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value));
-}
-#endif
+  #define SWIG_From_long   PyLong_FromLong 
 
 
 SWIGINTERNINLINE PyObject *
 SWIG_From_ptrdiff_t  (ptrdiff_t value)
 {    
-#ifdef SWIG_LONG_LONG_AVAILABLE
-  if (sizeof(ptrdiff_t) <= sizeof(long)) {
-#endif
-    return SWIG_From_long  (static_cast< long >(value));
-#ifdef SWIG_LONG_LONG_AVAILABLE
-  } else {
-    /* assume sizeof(ptrdiff_t) <= sizeof(long long) */
-    return SWIG_From_long_SS_long  (static_cast< long long >(value));
-  }
-#endif
+  return SWIG_From_long  (static_cast< long >(value));
 }
 
 
@@ -4046,63 +3964,12 @@ SWIG_AsVal_long (PyObject *obj, long* val)
 }
 
 
-#ifdef SWIG_LONG_LONG_AVAILABLE
-SWIGINTERN int
-SWIG_AsVal_long_SS_long (PyObject *obj, long long *val)
-{
-  int res = SWIG_TypeError;
-  if (PyLong_Check(obj)) {
-    long long v = PyLong_AsLongLong(obj);
-    if (!PyErr_Occurred()) {
-      if (val) *val = v;
-      return SWIG_OK;
-    } else {
-      PyErr_Clear();
-      res = SWIG_OverflowError;
-    }
-  } else {
-    long v;
-    res = SWIG_AsVal_long (obj,&v);
-    if (SWIG_IsOK(res)) {
-      if (val) *val = v;
-      return res;
-    }
-  }
-#ifdef SWIG_PYTHON_CAST_MODE
-  {
-    const double mant_max = 1LL << DBL_MANT_DIG;
-    const double mant_min = -mant_max;
-    double d;
-    res = SWIG_AsVal_double (obj,&d);
-    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) {
-      if (val) *val = (long long)(d);
-      return SWIG_AddCast(res);
-    }
-    res = SWIG_TypeError;
-  }
-#endif
-  return res;
-}
-#endif
-
-
 SWIGINTERNINLINE int
 SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
 {
-  int res = SWIG_TypeError;
-#ifdef SWIG_LONG_LONG_AVAILABLE
-  if (sizeof(ptrdiff_t) <= sizeof(long)) {
-#endif
-    long v;
-    res = SWIG_AsVal_long (obj, val ? &v : 0);
-    if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
-#ifdef SWIG_LONG_LONG_AVAILABLE
-  } else if (sizeof(ptrdiff_t) <= sizeof(long long)) {
-    long long v;
-    res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0);
-    if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
-  }
-#endif
+  long v;
+  int res = SWIG_AsVal_long (obj, val ? &v : 0);
+  if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
   return res;
 }
 
@@ -5282,33 +5149,14 @@ SWIGINTERNINLINE PyObject*
 SWIG_From_unsigned_SS_long  (unsigned long value)
 {
   return (value > LONG_MAX) ?
-    PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
-}
-
-
-#ifdef SWIG_LONG_LONG_AVAILABLE
-SWIGINTERNINLINE PyObject* 
-SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
-{
-  return (value > LONG_MAX) ?
-    PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
+    PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value)); 
 }
-#endif
 
 
 SWIGINTERNINLINE PyObject *
 SWIG_From_size_t  (size_t value)
 {    
-#ifdef SWIG_LONG_LONG_AVAILABLE
-  if (sizeof(size_t) <= sizeof(unsigned long)) {
-#endif
-    return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
-#ifdef SWIG_LONG_LONG_AVAILABLE
-  } else {
-    /* assume sizeof(size_t) <= sizeof(unsigned long long) */
-    return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long long >(value));
-  }
-#endif
+  return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
 }
 
 SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
@@ -5492,6 +5340,16 @@ SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vect
 SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos,std::vector< std::vector< double > >::value_type const &x){ return self->insert(pos, x); }
 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_1(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos,std::vector< std::vector< double > >::size_type n,std::vector< std::vector< double > >::value_type const &x){ self->insert(pos, n, x); }
 
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
 SWIGINTERN int
 SWIG_AsVal_int (PyObject * obj, int *val)
 {
@@ -5769,7 +5627,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_  (PyObject *o, std::complex<double>* val)
 
 
 SWIGINTERNINLINE PyObject*
-SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/share/swig/3.0.10/typemaps/swigmacros.swg,104,%ifcplusplus@*/
+SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/home/pospelov/software/local/share/swig/3.0.8/typemaps/swigmacros.swg,104,%ifcplusplus@*/
 
 const std::complex<double>&
 
@@ -5919,18 +5777,13 @@ SWIGINTERN int
 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
 {
 #if PY_VERSION_HEX>=0x03000000
-#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-  if (PyBytes_Check(obj))
-#else
   if (PyUnicode_Check(obj))
-#endif
 #else  
   if (PyString_Check(obj))
 #endif
   {
     char *cstr; Py_ssize_t len;
 #if PY_VERSION_HEX>=0x03000000
-#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
     if (!alloc && cptr) {
         /* We can't allow converting without allocation, since the internal
            representation of string in Python 3 is UCS-2/UCS-4 but we require
@@ -5939,9 +5792,8 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
         return SWIG_RuntimeError;
     }
     obj = PyUnicode_AsUTF8String(obj);
-    if(alloc) *alloc = SWIG_NEWOBJ;
-#endif
     PyBytes_AsStringAndSize(obj, &cstr, &len);
+    if(alloc) *alloc = SWIG_NEWOBJ;
 #else
     PyString_AsStringAndSize(obj, &cstr, &len);
 #endif
@@ -5969,27 +5821,19 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
 	  *alloc = SWIG_OLDOBJ;
 	}
       } else {
-#if PY_VERSION_HEX>=0x03000000
-#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-	*cptr = PyBytes_AsString(obj);
-#else
-	assert(0); /* Should never reach here with Unicode strings in Python 3 */
-#endif
-#else
+	#if PY_VERSION_HEX>=0x03000000
+	assert(0); /* Should never reach here in Python 3 */
+	#endif
 	*cptr = SWIG_Python_str_AsChar(obj);
-#endif
       }
     }
     if (psize) *psize = len + 1;
-#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
+#if PY_VERSION_HEX>=0x03000000
     Py_XDECREF(obj);
 #endif
     return SWIG_OK;
   } else {
 #if defined(SWIG_PYTHON_2_UNICODE)
-#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
-#endif
 #if PY_VERSION_HEX<0x03000000
     if (PyUnicode_Check(obj)) {
       char *cstr; Py_ssize_t len;
@@ -6087,15 +5931,11 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
 	SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
     } else {
 #if PY_VERSION_HEX >= 0x03000000
-#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-      return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
-#else
 #if PY_VERSION_HEX >= 0x03010000
       return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
 #else
       return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
 #endif
-#endif
 #else
       return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
 #endif
@@ -7135,6 +6975,17 @@ SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self),
   return SWIG_Py_Void();
 }
 
+SWIGINTERN PyObject *SHARED_PTR_DISOWN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *module;
+  PyObject *d;
+  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
+  d = PyModule_GetDict(module);
+  if (!d) return NULL;
+  SWIG_Python_SetConstant(d, "SHARED_PTR_DISOWN",SWIG_From_int(static_cast< int >(0)));
+  return SWIG_Py_Void();
+}
+
+
 SWIGINTERN PyObject *_wrap_vdouble1d_t_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   std::vector< double > *arg1 = (std::vector< double > *) 0 ;
@@ -21825,6 +21676,7 @@ static PyMethodDef SwigMethods[] = {
 		"SwigPyIterator___sub__(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t\n"
 		""},
 	 { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL},
+	 { (char *)"SHARED_PTR_DISOWN_swigconstant", SHARED_PTR_DISOWN_swigconstant, METH_VARARGS, NULL},
 	 { (char *)"vdouble1d_t_iterator", _wrap_vdouble1d_t_iterator, METH_VARARGS, (char *)"vdouble1d_t_iterator(vdouble1d_t self) -> SwigPyIterator"},
 	 { (char *)"vdouble1d_t___nonzero__", _wrap_vdouble1d_t___nonzero__, METH_VARARGS, (char *)"vdouble1d_t___nonzero__(vdouble1d_t self) -> bool"},
 	 { (char *)"vdouble1d_t___bool__", _wrap_vdouble1d_t___bool__, METH_VARARGS, (char *)"vdouble1d_t___bool__(vdouble1d_t self) -> bool"},
@@ -23623,7 +23475,6 @@ SWIG_init(void) {
   
   SWIG_InstallConstants(d,swig_const_table);
   
-  SWIG_Python_SetConstant(d, "SHARED_PTR_DISOWN",SWIG_From_int(static_cast< int >(0)));
   
   import_array();
   
diff --git a/auto/Wrap/libBornAgainFit_wrap.h b/auto/Wrap/libBornAgainFit_wrap.h
index 4b10958e078..1aa4403ae1c 100644
--- a/auto/Wrap/libBornAgainFit_wrap.h
+++ b/auto/Wrap/libBornAgainFit_wrap.h
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 3.0.10
+ * Version 3.0.8
  *
  * 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
-- 
GitLab