~ubuntu-branches/ubuntu/saucy/vips/saucy

« back to all changes in this revision

Viewing changes to swig/vipsCC/vdisplaymodule.cxx

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2012-05-29 14:25:06 UTC
  • mfrom: (1.1.18) (30.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20120529142506-caq92wajlrmde3nt
Tags: 7.28.5-1
* New upstream release
* multiarch, hardening
* Support bigtiff

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ----------------------------------------------------------------------------
2
2
 * This file was automatically generated by SWIG (http://www.swig.org).
3
 
 * Version 1.3.40
 
3
 * Version 2.0.4
4
4
 * 
5
5
 * This file is not intended to be easily readable and contains a number of 
6
6
 * coding conventions designed to improve portability and efficiency. Do not make
147
147
 
148
148
/* Python.h has to appear first */
149
149
#include <Python.h>
150
 
#include <stddef.h>
151
150
 
152
151
/* -----------------------------------------------------------------------------
153
152
 * swigrun.swg
202
201
/* 
203
202
   Flags/methods for returning states.
204
203
   
205
 
   The SWIG conversion methods, as ConvertPtr, return and integer 
 
204
   The SWIG conversion methods, as ConvertPtr, return an integer 
206
205
   that tells if the conversion was successful or not. And if not,
207
206
   an error code can be returned (see swigerrors.swg for the codes).
208
207
   
757
756
#define PyInt_Check(x) PyLong_Check(x)
758
757
#define PyInt_AsLong(x) PyLong_AsLong(x)
759
758
#define PyInt_FromLong(x) PyLong_FromLong(x)
 
759
#define PyString_Check(name) PyBytes_Check(name)
 
760
#define PyString_FromString(x) PyUnicode_FromString(x)
760
761
#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
 
762
#define PyString_AsString(str) PyBytes_AsString(str)
 
763
#define PyString_Size(str) PyBytes_Size(str)    
 
764
#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
 
765
#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
 
766
#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
 
767
#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
761
768
 
762
769
#endif
763
770
 
897
904
typedef int Py_ssize_t;
898
905
# define PY_SSIZE_T_MAX INT_MAX
899
906
# define PY_SSIZE_T_MIN INT_MIN
 
907
typedef inquiry lenfunc;
 
908
typedef intargfunc ssizeargfunc;
 
909
typedef intintargfunc ssizessizeargfunc;
 
910
typedef intobjargproc ssizeobjargproc;
 
911
typedef intintobjargproc ssizessizeobjargproc;
 
912
typedef getreadbufferproc readbufferproc;
 
913
typedef getwritebufferproc writebufferproc;
 
914
typedef getsegcountproc segcountproc;
 
915
typedef getcharbufferproc charbufferproc;
 
916
static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
 
917
{
 
918
  long result = 0;
 
919
  PyObject *i = PyNumber_Int(x);
 
920
  if (i) {
 
921
    result = PyInt_AsLong(i);
 
922
    Py_DECREF(i);
 
923
  }
 
924
  return result;
 
925
}
 
926
#endif
 
927
 
 
928
#if PY_VERSION_HEX < 0x02040000
 
929
#define Py_VISIT(op)                            \
 
930
  do {                                          \
 
931
    if (op) {                                   \
 
932
      int vret = visit((op), arg);              \
 
933
      if (vret)                                 \
 
934
        return vret;                            \
 
935
    }                                           \
 
936
  } while (0)
 
937
#endif
 
938
 
 
939
#if PY_VERSION_HEX < 0x02030000
 
940
typedef struct {
 
941
  PyTypeObject type;
 
942
  PyNumberMethods as_number;
 
943
  PyMappingMethods as_mapping;
 
944
  PySequenceMethods as_sequence;
 
945
  PyBufferProcs as_buffer;
 
946
  PyObject *name, *slots;
 
947
} PyHeapTypeObject;
 
948
#endif
 
949
 
 
950
#if PY_VERSION_HEX < 0x02030000
 
951
typedef destructor freefunc;
 
952
#endif
 
953
 
 
954
#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
 
955
     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
 
956
     (PY_MAJOR_VERSION > 3))
 
957
# define SWIGPY_USE_CAPSULE
 
958
# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
 
959
#endif
 
960
 
 
961
#if PY_VERSION_HEX < 0x03020000
 
962
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
 
963
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
900
964
#endif
901
965
 
902
966
/* -----------------------------------------------------------------------------
1043
1107
 
1044
1108
#ifdef __cplusplus
1045
1109
extern "C" {
1046
 
#if 0
1047
 
} /* cc-mode */
1048
 
#endif
1049
1110
#endif
1050
1111
 
1051
1112
/* -----------------------------------------------------------------------------
1071
1132
 * Wrapper of PyInstanceMethod_New() used in Python 3
1072
1133
 * It is exported to the generated module, used for -fastproxy
1073
1134
 * ----------------------------------------------------------------------------- */
1074
 
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
 
1135
#if PY_VERSION_HEX >= 0x03000000
 
1136
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
1075
1137
{
1076
 
#if PY_VERSION_HEX >= 0x03000000
1077
1138
  return PyInstanceMethod_New(func);
 
1139
}
1078
1140
#else
 
1141
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
 
1142
{
1079
1143
  return NULL;
 
1144
}
1080
1145
#endif
1081
 
}
1082
1146
 
1083
1147
#ifdef __cplusplus
1084
 
#if 0
1085
 
{ /* cc-mode */
1086
 
#endif
1087
1148
}
1088
1149
#endif
1089
1150
 
1090
1151
 
1091
1152
/* -----------------------------------------------------------------------------
1092
 
 * See the LICENSE file for information on copyright, usage and redistribution
1093
 
 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
1094
 
 *
1095
1153
 * pyrun.swg
1096
1154
 *
1097
1155
 * This file contains the runtime support for Python modules
1106
1164
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1107
1165
#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1108
1166
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1109
 
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(ptr, type, flags)
 
1167
 
 
1168
#ifdef SWIGPYTHON_BUILTIN
 
1169
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
 
1170
#else
 
1171
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
 
1172
#endif
 
1173
 
 
1174
#define SWIG_InternalNewPointerObj(ptr, type, flags)    SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
 
1175
 
1110
1176
#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
1111
1177
#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
1112
1178
#define swig_owntype                                    int
1121
1187
 
1122
1188
/* for C or C++ function pointers */
1123
1189
#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1124
 
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(ptr, type, 0)
 
1190
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1125
1191
 
1126
1192
/* for C++ member pointers, ie, member methods */
1127
1193
#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1164
1230
 
1165
1231
/* Set a constant value */
1166
1232
 
 
1233
#if defined(SWIGPYTHON_BUILTIN)
 
1234
 
 
1235
SWIGINTERN void
 
1236
SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
 
1237
  PyObject *s = PyString_InternFromString(key);
 
1238
  PyList_Append(seq, s);
 
1239
  Py_DECREF(s);
 
1240
}
 
1241
 
 
1242
SWIGINTERN void
 
1243
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
 
1244
  PyDict_SetItemString(d, (char *)name, obj);
 
1245
  Py_DECREF(obj);
 
1246
  if (public_interface)
 
1247
    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
 
1248
}
 
1249
 
 
1250
#else
 
1251
 
1167
1252
SWIGINTERN void
1168
1253
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
1169
 
  PyDict_SetItemString(d, (char*) name, obj);
 
1254
  PyDict_SetItemString(d, (char *)name, obj);
1170
1255
  Py_DECREF(obj);                            
1171
1256
}
1172
1257
 
 
1258
#endif
 
1259
 
1173
1260
/* Append a value to the result obj */
1174
1261
 
1175
1262
SWIGINTERN PyObject*
1230
1317
    }
1231
1318
  }  
1232
1319
  if (!PyTuple_Check(args)) {
 
1320
    if (min <= 1 && max >= 1) {
 
1321
      register int i;
 
1322
      objs[0] = args;
 
1323
      for (i = 1; i < max; ++i) {
 
1324
        objs[i] = 0;
 
1325
      }
 
1326
      return 2;
 
1327
    }
1233
1328
    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1234
1329
    return 0;
1235
1330
  } else {
1282
1377
 
1283
1378
#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
1284
1379
 
 
1380
#define SWIG_BUILTIN_TP_INIT        (SWIG_POINTER_OWN << 2)
 
1381
#define SWIG_BUILTIN_INIT           (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
 
1382
 
1285
1383
#ifdef __cplusplus
1286
1384
extern "C" {
1287
 
#if 0
1288
 
} /* cc-mode */
1289
 
#endif
1290
1385
#endif
1291
1386
 
1292
1387
/*  How to access Py_None */
1337
1432
  PyObject *destroy;
1338
1433
  int delargs;
1339
1434
  int implicitconv;
 
1435
  PyTypeObject *pytype;
1340
1436
} SwigPyClientData;
1341
1437
 
1342
1438
SWIGRUNTIMEINLINE int 
1403
1499
      data->delargs = 0;
1404
1500
    }
1405
1501
    data->implicitconv = 0;
 
1502
    data->pytype = 0;
1406
1503
    return data;
1407
1504
  }
1408
1505
}
1409
1506
 
1410
1507
SWIGRUNTIME void 
1411
 
SwigPyClientData_Del(SwigPyClientData* data)
1412
 
{
 
1508
SwigPyClientData_Del(SwigPyClientData *data) {
1413
1509
  Py_XDECREF(data->newraw);
1414
1510
  Py_XDECREF(data->newargs);
1415
1511
  Py_XDECREF(data->destroy);
1423
1519
  swig_type_info *ty;
1424
1520
  int own;
1425
1521
  PyObject *next;
 
1522
#ifdef SWIGPYTHON_BUILTIN
 
1523
  PyObject *dict;
 
1524
#endif
1426
1525
} SwigPyObject;
1427
1526
 
1428
1527
SWIGRUNTIME PyObject *
1473
1572
#endif
1474
1573
{
1475
1574
  const char *name = SWIG_TypePrettyName(v->ty);
1476
 
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
 
1575
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, (void *)v);
1477
1576
  if (v->next) {
1478
 
#ifdef METH_NOARGS
 
1577
# ifdef METH_NOARGS
1479
1578
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1480
 
#else
 
1579
# else
1481
1580
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1482
 
#endif
1483
 
#if PY_VERSION_HEX >= 0x03000000
 
1581
# endif
 
1582
# if PY_VERSION_HEX >= 0x03000000
1484
1583
    PyObject *joined = PyUnicode_Concat(repr, nrep);
1485
1584
    Py_DecRef(repr);
1486
1585
    Py_DecRef(nrep);
1487
1586
    repr = joined;
1488
 
#else
 
1587
# else
1489
1588
    PyString_ConcatAndDel(&repr,nrep);
1490
 
#endif
 
1589
# endif
1491
1590
  }
1492
1591
  return repr;  
1493
1592
}
1537
1636
    Py_INCREF(Py_NotImplemented);
1538
1637
    return Py_NotImplemented;
1539
1638
  }
1540
 
  if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
1541
 
    res = Py_True;
1542
 
  else
1543
 
    res = Py_False;
1544
 
  Py_INCREF(res);
 
1639
  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1545
1640
  return res;  
1546
1641
}
1547
1642
 
1548
1643
 
1549
 
SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
 
1644
SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1550
1645
 
1551
 
SWIGRUNTIME PyTypeObject*
1552
 
SwigPyObject_type(void) {
1553
 
  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
 
1646
#ifdef SWIGPYTHON_BUILTIN
 
1647
static swig_type_info *SwigPyObject_stype = 0;
 
1648
SWIGRUNTIME PyTypeObject*
 
1649
SwigPyObject_type(void) {
 
1650
    SwigPyClientData *cd;
 
1651
    assert(SwigPyObject_stype);
 
1652
    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
 
1653
    assert(cd);
 
1654
    assert(cd->pytype);
 
1655
    return cd->pytype;
 
1656
}
 
1657
#else
 
1658
SWIGRUNTIME PyTypeObject*
 
1659
SwigPyObject_type(void) {
 
1660
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1554
1661
  return type;
1555
1662
}
 
1663
#endif
1556
1664
 
1557
1665
SWIGRUNTIMEINLINE int
1558
1666
SwigPyObject_Check(PyObject *op) {
 
1667
#ifdef SWIGPYTHON_BUILTIN
 
1668
  PyTypeObject *target_tp = SwigPyObject_type();
 
1669
  if (PyType_IsSubtype(op->ob_type, target_tp))
 
1670
    return 1;
 
1671
  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
 
1672
#else
1559
1673
  return (Py_TYPE(op) == SwigPyObject_type())
1560
1674
    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
 
1675
#endif
1561
1676
}
1562
1677
 
1563
1678
SWIGRUNTIME PyObject *
1723
1838
#endif
1724
1839
 
1725
1840
SWIGRUNTIME PyTypeObject*
1726
 
_PySwigObject_type(void) {
 
1841
SwigPyObject_TypeOnce(void) {
1727
1842
  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1728
 
  
 
1843
 
1729
1844
  static PyNumberMethods SwigPyObject_as_number = {
1730
1845
    (binaryfunc)0, /*nb_add*/
1731
1846
    (binaryfunc)0, /*nb_subtract*/
1772
1887
#endif
1773
1888
  };
1774
1889
 
1775
 
  static PyTypeObject swigpyobject_type;  
 
1890
  static PyTypeObject swigpyobject_type;
1776
1891
  static int type_init = 0;
1777
1892
  if (!type_init) {
1778
 
    const PyTypeObject tmp
1779
 
      = {
1780
 
        /* PyObject header changed in Python 3 */
 
1893
    const PyTypeObject tmp = {
 
1894
      /* PyObject header changed in Python 3 */
1781
1895
#if PY_VERSION_HEX >= 0x03000000
1782
 
        PyVarObject_HEAD_INIT(&PyType_Type, 0)
1783
 
#else    
1784
 
        PyObject_HEAD_INIT(NULL)
1785
 
        0,                                  /* ob_size */
 
1896
      PyVarObject_HEAD_INIT(NULL, 0)
 
1897
#else
 
1898
      PyObject_HEAD_INIT(NULL)
 
1899
      0,                                    /* ob_size */
1786
1900
#endif
1787
 
        (char *)"SwigPyObject",             /* tp_name */
1788
 
        sizeof(SwigPyObject),               /* tp_basicsize */
1789
 
        0,                                  /* tp_itemsize */
1790
 
        (destructor)SwigPyObject_dealloc,   /* tp_dealloc */
1791
 
        (printfunc)SwigPyObject_print,      /* tp_print */
 
1901
      (char *)"SwigPyObject",               /* tp_name */
 
1902
      sizeof(SwigPyObject),                 /* tp_basicsize */
 
1903
      0,                                    /* tp_itemsize */
 
1904
      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
 
1905
      (printfunc)SwigPyObject_print,        /* tp_print */
1792
1906
#if PY_VERSION_HEX < 0x02020000
1793
 
        (getattrfunc)SwigPyObject_getattr,  /* tp_getattr */ 
 
1907
      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
1794
1908
#else
1795
 
        (getattrfunc)0,                     /* tp_getattr */ 
 
1909
      (getattrfunc)0,                       /* tp_getattr */
1796
1910
#endif
1797
 
        (setattrfunc)0,                     /* tp_setattr */ 
 
1911
      (setattrfunc)0,                       /* tp_setattr */
1798
1912
#if PY_VERSION_HEX >= 0x03000000
1799
1913
    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1800
1914
#else
1801
 
        (cmpfunc)SwigPyObject_compare,      /* tp_compare */
 
1915
      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
1802
1916
#endif
1803
 
        (reprfunc)SwigPyObject_repr,        /* tp_repr */    
1804
 
        &SwigPyObject_as_number,            /* tp_as_number */
1805
 
        0,                                  /* tp_as_sequence */
1806
 
        0,                                  /* tp_as_mapping */
1807
 
        (hashfunc)0,                        /* tp_hash */
1808
 
        (ternaryfunc)0,                     /* tp_call */
1809
 
        (reprfunc)SwigPyObject_str,         /* tp_str */
1810
 
        PyObject_GenericGetAttr,            /* tp_getattro */
1811
 
        0,                                  /* tp_setattro */
1812
 
        0,                                  /* tp_as_buffer */
1813
 
        Py_TPFLAGS_DEFAULT,                 /* tp_flags */
1814
 
        swigobject_doc,                     /* tp_doc */        
1815
 
        0,                                  /* tp_traverse */
1816
 
        0,                                  /* tp_clear */
1817
 
        (richcmpfunc)SwigPyObject_richcompare,           /* tp_richcompare */
1818
 
        0,                                  /* tp_weaklistoffset */
 
1917
      (reprfunc)SwigPyObject_repr,          /* tp_repr */
 
1918
      &SwigPyObject_as_number,              /* tp_as_number */
 
1919
      0,                                    /* tp_as_sequence */
 
1920
      0,                                    /* tp_as_mapping */
 
1921
      (hashfunc)0,                          /* tp_hash */
 
1922
      (ternaryfunc)0,                       /* tp_call */
 
1923
      (reprfunc)SwigPyObject_str,           /* tp_str */
 
1924
      PyObject_GenericGetAttr,              /* tp_getattro */
 
1925
      0,                                    /* tp_setattro */
 
1926
      0,                                    /* tp_as_buffer */
 
1927
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
 
1928
      swigobject_doc,                       /* tp_doc */
 
1929
      0,                                    /* tp_traverse */
 
1930
      0,                                    /* tp_clear */
 
1931
      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
 
1932
      0,                                    /* tp_weaklistoffset */
1819
1933
#if PY_VERSION_HEX >= 0x02020000
1820
 
        0,                                  /* tp_iter */
1821
 
        0,                                  /* tp_iternext */
1822
 
        swigobject_methods,                 /* tp_methods */ 
1823
 
        0,                                  /* tp_members */
1824
 
        0,                                  /* tp_getset */             
1825
 
        0,                                  /* tp_base */               
1826
 
        0,                                  /* tp_dict */               
1827
 
        0,                                  /* tp_descr_get */          
1828
 
        0,                                  /* tp_descr_set */          
1829
 
        0,                                  /* tp_dictoffset */         
1830
 
        0,                                  /* tp_init */               
1831
 
        0,                                  /* tp_alloc */              
1832
 
        0,                                  /* tp_new */                
1833
 
        0,                                  /* tp_free */          
1834
 
        0,                                  /* tp_is_gc */  
1835
 
        0,                                  /* tp_bases */   
1836
 
        0,                                  /* tp_mro */
1837
 
        0,                                  /* tp_cache */   
1838
 
        0,                                  /* tp_subclasses */
1839
 
        0,                                  /* tp_weaklist */
 
1934
      0,                                    /* tp_iter */
 
1935
      0,                                    /* tp_iternext */
 
1936
      swigobject_methods,                   /* tp_methods */
 
1937
      0,                                    /* tp_members */
 
1938
      0,                                    /* tp_getset */
 
1939
      0,                                    /* tp_base */
 
1940
      0,                                    /* tp_dict */
 
1941
      0,                                    /* tp_descr_get */
 
1942
      0,                                    /* tp_descr_set */
 
1943
      0,                                    /* tp_dictoffset */
 
1944
      0,                                    /* tp_init */
 
1945
      0,                                    /* tp_alloc */
 
1946
      0,                                    /* tp_new */
 
1947
      0,                                    /* tp_free */
 
1948
      0,                                    /* tp_is_gc */
 
1949
      0,                                    /* tp_bases */
 
1950
      0,                                    /* tp_mro */
 
1951
      0,                                    /* tp_cache */
 
1952
      0,                                    /* tp_subclasses */
 
1953
      0,                                    /* tp_weaklist */
1840
1954
#endif
1841
1955
#if PY_VERSION_HEX >= 0x02030000
1842
 
        0,                                  /* tp_del */
 
1956
      0,                                    /* tp_del */
 
1957
#endif
 
1958
#if PY_VERSION_HEX >= 0x02060000
 
1959
      0,                                    /* tp_version */
1843
1960
#endif
1844
1961
#ifdef COUNT_ALLOCS
1845
 
        0,0,0,0                             /* tp_alloc -> tp_next */
 
1962
      0,0,0,0                               /* tp_alloc -> tp_next */
1846
1963
#endif
1847
 
      };
 
1964
    };
1848
1965
    swigpyobject_type = tmp;
1849
 
    /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
1850
 
#if PY_VERSION_HEX < 0x03000000
 
1966
    type_init = 1;
 
1967
#if PY_VERSION_HEX < 0x02020000
1851
1968
    swigpyobject_type.ob_type = &PyType_Type;
 
1969
#else
 
1970
    if (PyType_Ready(&swigpyobject_type) < 0)
 
1971
      return NULL;
1852
1972
#endif
1853
 
    type_init = 1;
1854
1973
  }
1855
1974
  return &swigpyobject_type;
1856
1975
}
1924
2043
  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
1925
2044
}
1926
2045
 
1927
 
SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
 
2046
SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
1928
2047
 
1929
2048
SWIGRUNTIME PyTypeObject*
1930
2049
SwigPyPacked_type(void) {
1931
 
  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
 
2050
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1932
2051
  return type;
1933
2052
}
1934
2053
 
1935
2054
SWIGRUNTIMEINLINE int
1936
2055
SwigPyPacked_Check(PyObject *op) {
1937
 
  return ((op)->ob_type == _PySwigPacked_type()) 
 
2056
  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
1938
2057
    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1939
2058
}
1940
2059
 
1949
2068
}
1950
2069
 
1951
2070
SWIGRUNTIME PyTypeObject*
1952
 
_PySwigPacked_type(void) {
 
2071
SwigPyPacked_TypeOnce(void) {
1953
2072
  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1954
2073
  static PyTypeObject swigpypacked_type;
1955
 
  static int type_init = 0;  
 
2074
  static int type_init = 0;
1956
2075
  if (!type_init) {
1957
 
    const PyTypeObject tmp
1958
 
      = {
1959
 
    /* PyObject header changed in Python 3 */
1960
 
#if PY_VERSION_HEX>=0x03000000
1961
 
    PyVarObject_HEAD_INIT(&PyType_Type, 0)
1962
 
#else
1963
 
        PyObject_HEAD_INIT(NULL)
1964
 
    0,                              /* ob_size */       
1965
 
#endif
1966
 
        (char *)"SwigPyPacked",             /* tp_name */       
1967
 
        sizeof(SwigPyPacked),               /* tp_basicsize */  
1968
 
        0,                                  /* tp_itemsize */   
1969
 
        (destructor)SwigPyPacked_dealloc,   /* tp_dealloc */    
1970
 
        (printfunc)SwigPyPacked_print,      /* tp_print */      
1971
 
        (getattrfunc)0,                     /* tp_getattr */    
1972
 
        (setattrfunc)0,                     /* tp_setattr */    
1973
 
#if PY_VERSION_HEX>=0x03000000
1974
 
    0, /* tp_reserved in 3.0.1 */
1975
 
#else
1976
 
    (cmpfunc)SwigPyPacked_compare,          /* tp_compare */
1977
 
#endif
1978
 
        (reprfunc)SwigPyPacked_repr,        /* tp_repr */
1979
 
        0,                                  /* tp_as_number */
1980
 
        0,                                  /* tp_as_sequence */
1981
 
        0,                                  /* tp_as_mapping */
1982
 
        (hashfunc)0,                        /* tp_hash */
1983
 
        (ternaryfunc)0,                     /* tp_call */
1984
 
        (reprfunc)SwigPyPacked_str,         /* tp_str */
1985
 
        PyObject_GenericGetAttr,            /* tp_getattro */
1986
 
        0,                                  /* tp_setattro */
1987
 
        0,                                  /* tp_as_buffer */
1988
 
        Py_TPFLAGS_DEFAULT,                 /* tp_flags */
1989
 
        swigpacked_doc,                     /* tp_doc */
1990
 
        0,                                  /* tp_traverse */
1991
 
        0,                                  /* tp_clear */
1992
 
        0,                                  /* tp_richcompare */
1993
 
        0,                                  /* tp_weaklistoffset */
 
2076
    const PyTypeObject tmp = {
 
2077
      /* PyObject header changed in Python 3 */
 
2078
#if PY_VERSION_HEX>=0x03000000
 
2079
      PyVarObject_HEAD_INIT(NULL, 0)
 
2080
#else
 
2081
      PyObject_HEAD_INIT(NULL)
 
2082
      0,                                    /* ob_size */
 
2083
#endif
 
2084
      (char *)"SwigPyPacked",               /* tp_name */
 
2085
      sizeof(SwigPyPacked),                 /* tp_basicsize */
 
2086
      0,                                    /* tp_itemsize */
 
2087
      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
 
2088
      (printfunc)SwigPyPacked_print,        /* tp_print */
 
2089
      (getattrfunc)0,                       /* tp_getattr */
 
2090
      (setattrfunc)0,                       /* tp_setattr */
 
2091
#if PY_VERSION_HEX>=0x03000000
 
2092
      0, /* tp_reserved in 3.0.1 */
 
2093
#else
 
2094
      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
 
2095
#endif
 
2096
      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
 
2097
      0,                                    /* tp_as_number */
 
2098
      0,                                    /* tp_as_sequence */
 
2099
      0,                                    /* tp_as_mapping */
 
2100
      (hashfunc)0,                          /* tp_hash */
 
2101
      (ternaryfunc)0,                       /* tp_call */
 
2102
      (reprfunc)SwigPyPacked_str,           /* tp_str */
 
2103
      PyObject_GenericGetAttr,              /* tp_getattro */
 
2104
      0,                                    /* tp_setattro */
 
2105
      0,                                    /* tp_as_buffer */
 
2106
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
 
2107
      swigpacked_doc,                       /* tp_doc */
 
2108
      0,                                    /* tp_traverse */
 
2109
      0,                                    /* tp_clear */
 
2110
      0,                                    /* tp_richcompare */
 
2111
      0,                                    /* tp_weaklistoffset */
1994
2112
#if PY_VERSION_HEX >= 0x02020000
1995
 
        0,                                  /* tp_iter */
1996
 
        0,                                  /* tp_iternext */
1997
 
        0,                                  /* tp_methods */ 
1998
 
        0,                                  /* tp_members */
1999
 
        0,                                  /* tp_getset */             
2000
 
        0,                                  /* tp_base */               
2001
 
        0,                                  /* tp_dict */               
2002
 
        0,                                  /* tp_descr_get */          
2003
 
        0,                                  /* tp_descr_set */          
2004
 
        0,                                  /* tp_dictoffset */         
2005
 
        0,                                  /* tp_init */               
2006
 
        0,                                  /* tp_alloc */              
2007
 
        0,                                  /* tp_new */                
2008
 
        0,                                  /* tp_free */          
2009
 
        0,                                  /* tp_is_gc */  
2010
 
        0,                                  /* tp_bases */   
2011
 
        0,                                  /* tp_mro */
2012
 
        0,                                  /* tp_cache */   
2013
 
        0,                                  /* tp_subclasses */
2014
 
        0,                                  /* tp_weaklist */
 
2113
      0,                                    /* tp_iter */
 
2114
      0,                                    /* tp_iternext */
 
2115
      0,                                    /* tp_methods */
 
2116
      0,                                    /* tp_members */
 
2117
      0,                                    /* tp_getset */
 
2118
      0,                                    /* tp_base */
 
2119
      0,                                    /* tp_dict */
 
2120
      0,                                    /* tp_descr_get */
 
2121
      0,                                    /* tp_descr_set */
 
2122
      0,                                    /* tp_dictoffset */
 
2123
      0,                                    /* tp_init */
 
2124
      0,                                    /* tp_alloc */
 
2125
      0,                                    /* tp_new */
 
2126
      0,                                    /* tp_free */
 
2127
      0,                                    /* tp_is_gc */
 
2128
      0,                                    /* tp_bases */
 
2129
      0,                                    /* tp_mro */
 
2130
      0,                                    /* tp_cache */
 
2131
      0,                                    /* tp_subclasses */
 
2132
      0,                                    /* tp_weaklist */
2015
2133
#endif
2016
2134
#if PY_VERSION_HEX >= 0x02030000
2017
 
        0,                                  /* tp_del */
 
2135
      0,                                    /* tp_del */
 
2136
#endif
 
2137
#if PY_VERSION_HEX >= 0x02060000
 
2138
      0,                                    /* tp_version */
2018
2139
#endif
2019
2140
#ifdef COUNT_ALLOCS
2020
 
        0,0,0,0                             /* tp_alloc -> tp_next */
 
2141
      0,0,0,0                               /* tp_alloc -> tp_next */
2021
2142
#endif
2022
 
      };
 
2143
    };
2023
2144
    swigpypacked_type = tmp;
2024
 
    /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
2025
 
#if PY_VERSION_HEX < 0x03000000
 
2145
    type_init = 1;
 
2146
#if PY_VERSION_HEX < 0x02020000
2026
2147
    swigpypacked_type.ob_type = &PyType_Type;
 
2148
#else
 
2149
    if (PyType_Ready(&swigpypacked_type) < 0)
 
2150
      return NULL;
2027
2151
#endif
2028
 
    type_init = 1;
2029
2152
  }
2030
2153
  return &swigpypacked_type;
2031
2154
}
2072
2195
    return SWIG_Python_str_FromChar("this");
2073
2196
}
2074
2197
 
 
2198
static PyObject *swig_this = NULL;
 
2199
 
2075
2200
SWIGRUNTIME PyObject *
2076
2201
SWIG_This(void)
2077
2202
{
2078
 
  static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
 
2203
  if (swig_this == NULL)
 
2204
    swig_this = _SWIG_This();
2079
2205
  return swig_this;
2080
2206
}
2081
2207
 
2089
2215
SWIGRUNTIME SwigPyObject *
2090
2216
SWIG_Python_GetSwigThis(PyObject *pyobj) 
2091
2217
{
2092
 
  if (SwigPyObject_Check(pyobj)) {
 
2218
  PyObject *obj;
 
2219
 
 
2220
  if (SwigPyObject_Check(pyobj))
2093
2221
    return (SwigPyObject *) pyobj;
2094
 
  } else {
2095
 
    PyObject *obj = 0;
 
2222
 
 
2223
#ifdef SWIGPYTHON_BUILTIN
 
2224
  (void)obj;
 
2225
# ifdef PyWeakref_CheckProxy
 
2226
  if (PyWeakref_CheckProxy(pyobj)) {
 
2227
    pyobj = PyWeakref_GET_OBJECT(pyobj);
 
2228
    if (pyobj && SwigPyObject_Check(pyobj))
 
2229
      return (SwigPyObject*) pyobj;
 
2230
  }
 
2231
# endif
 
2232
  return NULL;
 
2233
#else
 
2234
 
 
2235
  obj = 0;
 
2236
 
2096
2237
#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2097
 
    if (PyInstance_Check(pyobj)) {
2098
 
      obj = _PyInstance_Lookup(pyobj, SWIG_This());      
 
2238
  if (PyInstance_Check(pyobj)) {
 
2239
    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
 
2240
  } else {
 
2241
    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
 
2242
    if (dictptr != NULL) {
 
2243
      PyObject *dict = *dictptr;
 
2244
      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2099
2245
    } else {
2100
 
      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2101
 
      if (dictptr != NULL) {
2102
 
        PyObject *dict = *dictptr;
2103
 
        obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2104
 
      } else {
2105
2246
#ifdef PyWeakref_CheckProxy
2106
 
        if (PyWeakref_CheckProxy(pyobj)) {
2107
 
          PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2108
 
          return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2109
 
        }
 
2247
      if (PyWeakref_CheckProxy(pyobj)) {
 
2248
        PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
 
2249
        return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
 
2250
      }
2110
2251
#endif
2111
 
        obj = PyObject_GetAttr(pyobj,SWIG_This());
2112
 
        if (obj) {
2113
 
          Py_DECREF(obj);
2114
 
        } else {
2115
 
          if (PyErr_Occurred()) PyErr_Clear();
2116
 
          return 0;
2117
 
        }
 
2252
      obj = PyObject_GetAttr(pyobj,SWIG_This());
 
2253
      if (obj) {
 
2254
        Py_DECREF(obj);
 
2255
      } else {
 
2256
        if (PyErr_Occurred()) PyErr_Clear();
 
2257
        return 0;
2118
2258
      }
2119
2259
    }
 
2260
  }
2120
2261
#else
2121
 
    obj = PyObject_GetAttr(pyobj,SWIG_This());
2122
 
    if (obj) {
2123
 
      Py_DECREF(obj);
2124
 
    } else {
2125
 
      if (PyErr_Occurred()) PyErr_Clear();
2126
 
      return 0;
2127
 
    }
2128
 
#endif
2129
 
    if (obj && !SwigPyObject_Check(obj)) {
2130
 
      /* a PyObject is called 'this', try to get the 'real this'
2131
 
         SwigPyObject from it */ 
2132
 
      return SWIG_Python_GetSwigThis(obj);
2133
 
    }
2134
 
    return (SwigPyObject *)obj;
2135
 
  }
 
2262
  obj = PyObject_GetAttr(pyobj,SWIG_This());
 
2263
  if (obj) {
 
2264
    Py_DECREF(obj);
 
2265
  } else {
 
2266
    if (PyErr_Occurred()) PyErr_Clear();
 
2267
    return 0;
 
2268
  }
 
2269
#endif
 
2270
  if (obj && !SwigPyObject_Check(obj)) {
 
2271
    /* a PyObject is called 'this', try to get the 'real this'
 
2272
       SwigPyObject from it */ 
 
2273
    return SWIG_Python_GetSwigThis(obj);
 
2274
  }
 
2275
  return (SwigPyObject *)obj;
 
2276
#endif
2136
2277
}
2137
2278
 
2138
2279
/* Acquire a pointer value */
2154
2295
 
2155
2296
SWIGRUNTIME int
2156
2297
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2157
 
  if (!obj) return SWIG_ERROR;
 
2298
  int res;
 
2299
  SwigPyObject *sobj;
 
2300
 
 
2301
  if (!obj)
 
2302
    return SWIG_ERROR;
2158
2303
  if (obj == Py_None) {
2159
 
    if (ptr) *ptr = 0;
 
2304
    if (ptr)
 
2305
      *ptr = 0;
2160
2306
    return SWIG_OK;
2161
 
  } else {
2162
 
    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
 
2307
  }
 
2308
 
 
2309
  res = SWIG_ERROR;
 
2310
 
 
2311
  sobj = SWIG_Python_GetSwigThis(obj);
 
2312
  if (own)
 
2313
    *own = 0;
 
2314
  while (sobj) {
 
2315
    void *vptr = sobj->ptr;
 
2316
    if (ty) {
 
2317
      swig_type_info *to = sobj->ty;
 
2318
      if (to == ty) {
 
2319
        /* no type cast needed */
 
2320
        if (ptr) *ptr = vptr;
 
2321
        break;
 
2322
      } else {
 
2323
        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
 
2324
        if (!tc) {
 
2325
          sobj = (SwigPyObject *)sobj->next;
 
2326
        } else {
 
2327
          if (ptr) {
 
2328
            int newmemory = 0;
 
2329
            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
 
2330
            if (newmemory == SWIG_CAST_NEW_MEMORY) {
 
2331
              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
 
2332
              if (own)
 
2333
                *own = *own | SWIG_CAST_NEW_MEMORY;
 
2334
            }
 
2335
          }
 
2336
          break;
 
2337
        }
 
2338
      }
 
2339
    } else {
 
2340
      if (ptr) *ptr = vptr;
 
2341
      break;
 
2342
    }
 
2343
  }
 
2344
  if (sobj) {
2163
2345
    if (own)
2164
 
      *own = 0;
2165
 
    while (sobj) {
2166
 
      void *vptr = sobj->ptr;
2167
 
      if (ty) {
2168
 
        swig_type_info *to = sobj->ty;
2169
 
        if (to == ty) {
2170
 
          /* no type cast needed */
2171
 
          if (ptr) *ptr = vptr;
2172
 
          break;
2173
 
        } else {
2174
 
          swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2175
 
          if (!tc) {
2176
 
            sobj = (SwigPyObject *)sobj->next;
2177
 
          } else {
2178
 
            if (ptr) {
2179
 
              int newmemory = 0;
2180
 
              *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2181
 
              if (newmemory == SWIG_CAST_NEW_MEMORY) {
2182
 
                assert(own);
2183
 
                if (own)
2184
 
                  *own = *own | SWIG_CAST_NEW_MEMORY;
 
2346
      *own = *own | sobj->own;
 
2347
    if (flags & SWIG_POINTER_DISOWN) {
 
2348
      sobj->own = 0;
 
2349
    }
 
2350
    res = SWIG_OK;
 
2351
  } else {
 
2352
    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
 
2353
      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
 
2354
      if (data && !data->implicitconv) {
 
2355
        PyObject *klass = data->klass;
 
2356
        if (klass) {
 
2357
          PyObject *impconv;
 
2358
          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
 
2359
          impconv = SWIG_Python_CallFunctor(klass, obj);
 
2360
          data->implicitconv = 0;
 
2361
          if (PyErr_Occurred()) {
 
2362
            PyErr_Clear();
 
2363
            impconv = 0;
 
2364
          }
 
2365
          if (impconv) {
 
2366
            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
 
2367
            if (iobj) {
 
2368
              void *vptr;
 
2369
              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
 
2370
              if (SWIG_IsOK(res)) {
 
2371
                if (ptr) {
 
2372
                  *ptr = vptr;
 
2373
                  /* transfer the ownership to 'ptr' */
 
2374
                  iobj->own = 0;
 
2375
                  res = SWIG_AddCast(res);
 
2376
                  res = SWIG_AddNewMask(res);
 
2377
                } else {
 
2378
                  res = SWIG_AddCast(res);                  
 
2379
                }
2185
2380
              }
2186
2381
            }
2187
 
            break;
2188
 
          }
2189
 
        }
2190
 
      } else {
2191
 
        if (ptr) *ptr = vptr;
2192
 
        break;
2193
 
      }
2194
 
    }
2195
 
    if (sobj) {
2196
 
      if (own)
2197
 
        *own = *own | sobj->own;
2198
 
      if (flags & SWIG_POINTER_DISOWN) {
2199
 
        sobj->own = 0;
2200
 
      }
2201
 
      return SWIG_OK;
2202
 
    } else {
2203
 
      int res = SWIG_ERROR;
2204
 
      if (flags & SWIG_POINTER_IMPLICIT_CONV) {
2205
 
        SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2206
 
        if (data && !data->implicitconv) {
2207
 
          PyObject *klass = data->klass;
2208
 
          if (klass) {
2209
 
            PyObject *impconv;
2210
 
            data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2211
 
            impconv = SWIG_Python_CallFunctor(klass, obj);
2212
 
            data->implicitconv = 0;
2213
 
            if (PyErr_Occurred()) {
2214
 
              PyErr_Clear();
2215
 
              impconv = 0;
2216
 
            }
2217
 
            if (impconv) {
2218
 
              SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2219
 
              if (iobj) {
2220
 
                void *vptr;
2221
 
                res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2222
 
                if (SWIG_IsOK(res)) {
2223
 
                  if (ptr) {
2224
 
                    *ptr = vptr;
2225
 
                    /* transfer the ownership to 'ptr' */
2226
 
                    iobj->own = 0;
2227
 
                    res = SWIG_AddCast(res);
2228
 
                    res = SWIG_AddNewMask(res);
2229
 
                  } else {
2230
 
                    res = SWIG_AddCast(res);                
2231
 
                  }
2232
 
                }
2233
 
              }
2234
 
              Py_DECREF(impconv);
2235
 
            }
2236
 
          }
2237
 
        }
2238
 
      }
2239
 
      return res;
 
2382
            Py_DECREF(impconv);
 
2383
          }
 
2384
        }
 
2385
      }
2240
2386
    }
2241
2387
  }
 
2388
  return res;
2242
2389
}
2243
2390
 
2244
2391
/* Convert a function ptr value */
2408
2555
/* Create a new pointer object */
2409
2556
 
2410
2557
SWIGRUNTIME PyObject *
2411
 
SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
2412
 
  if (!ptr) {
 
2558
SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
 
2559
  SwigPyClientData *clientdata;
 
2560
  PyObject * robj;
 
2561
  int own;
 
2562
 
 
2563
  if (!ptr)
2413
2564
    return SWIG_Py_Void();
2414
 
  } else {
2415
 
    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2416
 
    PyObject *robj = SwigPyObject_New(ptr, type, own);
2417
 
    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2418
 
    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2419
 
      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2420
 
      if (inst) {
2421
 
        Py_DECREF(robj);
2422
 
        robj = inst;
 
2565
 
 
2566
  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
 
2567
  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
 
2568
  if (clientdata && clientdata->pytype) {
 
2569
    SwigPyObject *newobj;
 
2570
    if (flags & SWIG_BUILTIN_TP_INIT) {
 
2571
      newobj = (SwigPyObject*) self;
 
2572
      if (newobj->ptr) {
 
2573
        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
 
2574
        while (newobj->next)
 
2575
          newobj = (SwigPyObject *) newobj->next;
 
2576
        newobj->next = next_self;
 
2577
        newobj = (SwigPyObject *)next_self;
2423
2578
      }
2424
 
    }
2425
 
    return robj;
2426
 
  }
 
2579
    } else {
 
2580
      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
 
2581
    }
 
2582
    if (newobj) {
 
2583
      newobj->ptr = ptr;
 
2584
      newobj->ty = type;
 
2585
      newobj->own = own;
 
2586
      newobj->next = 0;
 
2587
#ifdef SWIGPYTHON_BUILTIN
 
2588
      newobj->dict = 0;
 
2589
#endif
 
2590
      return (PyObject*) newobj;
 
2591
    }
 
2592
    return SWIG_Py_Void();
 
2593
  }
 
2594
 
 
2595
  assert(!(flags & SWIG_BUILTIN_TP_INIT));
 
2596
 
 
2597
  robj = SwigPyObject_New(ptr, type, own);
 
2598
  if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
 
2599
    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
 
2600
    if (inst) {
 
2601
      Py_DECREF(robj);
 
2602
      robj = inst;
 
2603
    }
 
2604
  }
 
2605
  return robj;
2427
2606
}
2428
2607
 
2429
2608
/* Create a new packed object */
2449
2628
#ifdef SWIG_LINK_RUNTIME
2450
2629
    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2451
2630
#else
 
2631
# ifdef SWIGPY_USE_CAPSULE
 
2632
    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
 
2633
# else
2452
2634
    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2453
2635
                                    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
 
2636
# endif
2454
2637
    if (PyErr_Occurred()) {
2455
2638
      PyErr_Clear();
2456
2639
      type_pointer = (void *)0;
2493
2676
#endif
2494
2677
 
2495
2678
SWIGRUNTIME void
 
2679
#ifdef SWIGPY_USE_CAPSULE
 
2680
SWIG_Python_DestroyModule(PyObject *obj)
 
2681
#else
2496
2682
SWIG_Python_DestroyModule(void *vptr)
 
2683
#endif
2497
2684
{
 
2685
#ifdef SWIGPY_USE_CAPSULE
 
2686
  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
 
2687
#else
2498
2688
  swig_module_info *swig_module = (swig_module_info *) vptr;
 
2689
#endif
2499
2690
  swig_type_info **types = swig_module->types;
2500
2691
  size_t i;
2501
2692
  for (i =0; i < swig_module->size; ++i) {
2506
2697
    }
2507
2698
  }
2508
2699
  Py_DECREF(SWIG_This());
 
2700
  swig_this = NULL;
2509
2701
}
2510
2702
 
2511
2703
SWIGRUNTIME void
2512
2704
SWIG_Python_SetModule(swig_module_info *swig_module) {
2513
 
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
2514
 
 
2515
2705
#if PY_VERSION_HEX >= 0x03000000
2516
2706
 /* Add a dummy module object into sys.modules */
2517
2707
  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2518
2708
#else
2519
 
  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2520
 
                                   swig_empty_runtime_method_table);
 
2709
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
 
2710
  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2521
2711
#endif
 
2712
#ifdef SWIGPY_USE_CAPSULE
 
2713
  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
 
2714
  if (pointer && module) {
 
2715
    PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
 
2716
  } else {
 
2717
    Py_XDECREF(pointer);
 
2718
  }
 
2719
#else
2522
2720
  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2523
2721
  if (pointer && module) {
2524
2722
    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2525
2723
  } else {
2526
2724
    Py_XDECREF(pointer);
2527
2725
  }
 
2726
#endif
2528
2727
}
2529
2728
 
2530
2729
/* The python cached type query */
2542
2741
  PyObject *obj = PyDict_GetItem(cache, key);
2543
2742
  swig_type_info *descriptor;
2544
2743
  if (obj) {
 
2744
#ifdef SWIGPY_USE_CAPSULE
 
2745
    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
 
2746
#else
2545
2747
    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
 
2748
#endif
2546
2749
  } else {
2547
2750
    swig_module_info *swig_module = SWIG_Python_GetModule();
2548
2751
    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2549
2752
    if (descriptor) {
 
2753
#ifdef SWIGPY_USE_CAPSULE
 
2754
      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
 
2755
#else
2550
2756
      obj = PyCObject_FromVoidPtr(descriptor, NULL);
 
2757
#endif
2551
2758
      PyDict_SetItem(cache, key, obj);
2552
2759
      Py_DECREF(obj);
2553
2760
    }
2651
2858
 
2652
2859
/* Convert a pointer value, signal an exception on a type mismatch */
2653
2860
SWIGRUNTIME void *
2654
 
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
 
2861
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2655
2862
  void *result;
2656
2863
  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2657
2864
    PyErr_Clear();
2665
2872
  return result;
2666
2873
}
2667
2874
 
 
2875
SWIGRUNTIME int
 
2876
SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
 
2877
  PyTypeObject *tp = obj->ob_type;
 
2878
  PyObject *descr;
 
2879
  PyObject *encoded_name;
 
2880
  descrsetfunc f;
 
2881
  int res;
 
2882
 
 
2883
#ifdef Py_USING_UNICODE
 
2884
  if (PyString_Check(name)) {
 
2885
    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
 
2886
    if (!name)
 
2887
      return -1;
 
2888
  } else if (!PyUnicode_Check(name))
 
2889
#else
 
2890
  if (!PyString_Check(name))
 
2891
#endif
 
2892
  {
 
2893
    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
 
2894
    return -1;
 
2895
  } else {
 
2896
    Py_INCREF(name);
 
2897
  }
 
2898
 
 
2899
  if (!tp->tp_dict) {
 
2900
    if (PyType_Ready(tp) < 0)
 
2901
      goto done;
 
2902
  }
 
2903
 
 
2904
  res = -1;
 
2905
  descr = _PyType_Lookup(tp, name);
 
2906
  f = NULL;
 
2907
  if (descr != NULL)
 
2908
    f = descr->ob_type->tp_descr_set;
 
2909
  if (!f) {
 
2910
    if (PyString_Check(name)) {
 
2911
      encoded_name = name;
 
2912
      Py_INCREF(name);
 
2913
    } else {
 
2914
      encoded_name = PyUnicode_AsUTF8String(name);
 
2915
    }
 
2916
    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
 
2917
    Py_DECREF(encoded_name);
 
2918
  } else {
 
2919
    res = f(descr, obj, value);
 
2920
  }
 
2921
  
 
2922
  done:
 
2923
  Py_DECREF(name);
 
2924
  return res;
 
2925
}
 
2926
 
2668
2927
 
2669
2928
#ifdef __cplusplus
2670
 
#if 0
2671
 
{ /* cc-mode */
2672
 
#endif
2673
2929
}
2674
2930
#endif
2675
2931
 
2714
2970
#endif
2715
2971
#define SWIG_name    "vdisplaymodule"
2716
2972
 
2717
 
#define SWIGVERSION 0x010340 
 
2973
#define SWIGVERSION 0x020004 
2718
2974
#define SWIG_VERSION SWIGVERSION
2719
2975
 
2720
2976
 
2969
3225
  int ii;
2970
3226
  
2971
3227
  if (!PyTuple_Check(args)) SWIG_fail;
2972
 
  argc = (int)PyObject_Length(args);
2973
 
  for (ii = 0; (ii < argc) && (ii < 1); ii++) {
 
3228
  argc = args ? (int)PyObject_Length(args) : 0;
 
3229
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
2974
3230
    argv[ii] = PyTuple_GET_ITEM(args,ii);
2975
3231
  }
2976
3232
  if (argc == 0) {
2994
3250
  }
2995
3251
  
2996
3252
fail:
2997
 
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_VDisplay'.\n"
 
3253
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_VDisplay'.\n"
2998
3254
    "  Possible C/C++ prototypes are:\n"
2999
 
    "    vips::VDisplay(char const *)\n"
3000
 
    "    vips::VDisplay()\n"
3001
 
    "    vips::VDisplay(vips::VDisplay const &)\n");
3002
 
  return NULL;
 
3255
    "    vips::VDisplay::VDisplay(char const *)\n"
 
3256
    "    vips::VDisplay::VDisplay()\n"
 
3257
    "    vips::VDisplay::VDisplay(vips::VDisplay const &)\n");
 
3258
  return 0;
3003
3259
}
3004
3260
 
3005
3261
 
3541
3797
  swig_varlink_type(void) {
3542
3798
    static char varlink__doc__[] = "Swig var link object";
3543
3799
    static PyTypeObject varlink_type;
3544
 
    static int type_init = 0;  
 
3800
    static int type_init = 0;
3545
3801
    if (!type_init) {
3546
 
      const PyTypeObject tmp
3547
 
      = {
 
3802
      const PyTypeObject tmp = {
3548
3803
        /* PyObject header changed in Python 3 */
3549
3804
#if PY_VERSION_HEX >= 0x03000000
3550
 
        PyVarObject_HEAD_INIT(&PyType_Type, 0)
 
3805
        PyVarObject_HEAD_INIT(NULL, 0)
3551
3806
#else
3552
3807
        PyObject_HEAD_INIT(NULL)
3553
 
        0,                                  /* Number of items in variable part (ob_size) */
 
3808
        0,                                  /* ob_size */
3554
3809
#endif
3555
 
        (char *)"swigvarlink",              /* Type name (tp_name) */
3556
 
        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
3557
 
        0,                                  /* Itemsize (tp_itemsize) */
3558
 
        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
3559
 
        (printfunc) swig_varlink_print,     /* Print (tp_print) */
3560
 
        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
3561
 
        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
 
3810
        (char *)"swigvarlink",              /* tp_name */
 
3811
        sizeof(swig_varlinkobject),         /* tp_basicsize */
 
3812
        0,                                  /* tp_itemsize */
 
3813
        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
 
3814
        (printfunc) swig_varlink_print,     /* tp_print */
 
3815
        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
 
3816
        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
3562
3817
        0,                                  /* tp_compare */
3563
3818
        (reprfunc) swig_varlink_repr,       /* tp_repr */
3564
3819
        0,                                  /* tp_as_number */
3582
3837
#if PY_VERSION_HEX >= 0x02030000
3583
3838
        0,                                  /* tp_del */
3584
3839
#endif
 
3840
#if PY_VERSION_HEX >= 0x02060000
 
3841
        0,                                  /* tp_version */
 
3842
#endif
3585
3843
#ifdef COUNT_ALLOCS
3586
3844
        0,0,0,0                             /* tp_alloc -> tp_next */
3587
3845
#endif
3588
3846
      };
3589
3847
      varlink_type = tmp;
3590
 
      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
3591
 
#if PY_VERSION_HEX < 0x03000000
 
3848
      type_init = 1;
 
3849
#if PY_VERSION_HEX < 0x02020000
3592
3850
      varlink_type.ob_type = &PyType_Type;
 
3851
#else
 
3852
      if (PyType_Ready(&varlink_type) < 0)
 
3853
      return NULL;
3593
3854
#endif
3594
 
      type_init = 1;
3595
3855
    }
3596
3856
    return &varlink_type;
3597
3857
  }
3642
3902
    for (i = 0; constants[i].type; ++i) {
3643
3903
      switch(constants[i].type) {
3644
3904
      case SWIG_PY_POINTER:
3645
 
        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
 
3905
        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
3646
3906
        break;
3647
3907
      case SWIG_PY_BINARY:
3648
3908
        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
3682
3942
          }
3683
3943
        }
3684
3944
        if (ci) {
3685
 
          size_t shift = (ci->ptype) - types;
3686
 
          swig_type_info *ty = types_initial[shift];
3687
 
          size_t ldoc = (c - methods[i].ml_doc);
3688
 
          size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
3689
 
          char *ndoc = (char*)malloc(ldoc + lptr + 10);
3690
 
          if (ndoc) {
3691
 
            char *buff = ndoc;
3692
 
            void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
3693
 
            if (ptr) {
 
3945
          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
 
3946
          if (ptr) {
 
3947
            size_t shift = (ci->ptype) - types;
 
3948
            swig_type_info *ty = types_initial[shift];
 
3949
            size_t ldoc = (c - methods[i].ml_doc);
 
3950
            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
 
3951
            char *ndoc = (char*)malloc(ldoc + lptr + 10);
 
3952
            if (ndoc) {
 
3953
              char *buff = ndoc;
3694
3954
              strncpy(buff, methods[i].ml_doc, ldoc);
3695
3955
              buff += ldoc;
3696
3956
              strncpy(buff, "swig_ptr: ", 10);
3723
3983
void
3724
3984
#endif
3725
3985
SWIG_init(void) {
3726
 
  PyObject *m, *d;  
 
3986
  PyObject *m, *d, *md;
3727
3987
#if PY_VERSION_HEX >= 0x03000000
3728
3988
  static struct PyModuleDef SWIG_module = {
 
3989
# if PY_VERSION_HEX >= 0x03020000
3729
3990
    PyModuleDef_HEAD_INIT,
 
3991
# else
 
3992
    {
 
3993
      PyObject_HEAD_INIT(NULL)
 
3994
      NULL, /* m_init */
 
3995
      0,    /* m_index */
 
3996
      NULL, /* m_copy */
 
3997
    },
 
3998
# endif
3730
3999
    (char *) SWIG_name,
3731
4000
    NULL,
3732
4001
    -1,
3738
4007
  };
3739
4008
#endif
3740
4009
  
 
4010
#if defined(SWIGPYTHON_BUILTIN)
 
4011
  static SwigPyClientData SwigPyObject_clientdata = {
 
4012
    0, 0, 0, 0, 0, 0, 0
 
4013
  };
 
4014
  static PyGetSetDef this_getset_def = {
 
4015
    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
 
4016
  };
 
4017
  static SwigPyGetSet thisown_getset_closure = {
 
4018
    (PyCFunction) SwigPyObject_own,
 
4019
    (PyCFunction) SwigPyObject_own
 
4020
  };
 
4021
  static PyGetSetDef thisown_getset_def = {
 
4022
    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
 
4023
  };
 
4024
  PyObject *metatype_args;
 
4025
  PyTypeObject *builtin_pytype;
 
4026
  int builtin_base_count;
 
4027
  swig_type_info *builtin_basetype;
 
4028
  PyObject *tuple;
 
4029
  PyGetSetDescrObject *static_getset;
 
4030
  PyTypeObject *metatype;
 
4031
  SwigPyClientData *cd;
 
4032
  PyObject *public_interface, *public_symbol;
 
4033
  PyObject *this_descr;
 
4034
  PyObject *thisown_descr;
 
4035
  int i;
 
4036
  
 
4037
  (void)builtin_pytype;
 
4038
  (void)builtin_base_count;
 
4039
  (void)builtin_basetype;
 
4040
  (void)tuple;
 
4041
  (void)static_getset;
 
4042
  
 
4043
  /* metatype is used to implement static member variables. */
 
4044
  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
 
4045
  assert(metatype_args);
 
4046
  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
 
4047
  assert(metatype);
 
4048
  Py_DECREF(metatype_args);
 
4049
  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
 
4050
  assert(PyType_Ready(metatype) >= 0);
 
4051
#endif
 
4052
  
3741
4053
  /* Fix SwigMethods to carry the callback ptrs when needed */
3742
4054
  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
3743
4055
  
3746
4058
#else
3747
4059
  m = Py_InitModule((char *) SWIG_name, SwigMethods);
3748
4060
#endif
3749
 
  d = PyModule_GetDict(m);
 
4061
  md = d = PyModule_GetDict(m);
3750
4062
  
3751
4063
  SWIG_InitializeModule(0);
 
4064
  
 
4065
#ifdef SWIGPYTHON_BUILTIN
 
4066
  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
 
4067
  assert(SwigPyObject_stype);
 
4068
  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
 
4069
  if (!cd) {
 
4070
    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
 
4071
    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
 
4072
  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
 
4073
    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
 
4074
# if PY_VERSION_HEX >= 0x03000000
 
4075
    return NULL;
 
4076
# else
 
4077
    return;
 
4078
# endif
 
4079
  }
 
4080
  
 
4081
  /* All objects have a 'this' attribute */
 
4082
  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
 
4083
  (void)this_descr;
 
4084
  
 
4085
  /* All objects have a 'thisown' attribute */
 
4086
  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
 
4087
  (void)thisown_descr;
 
4088
  
 
4089
  public_interface = PyList_New(0);
 
4090
  public_symbol = 0;
 
4091
  (void)public_symbol;
 
4092
  
 
4093
  PyDict_SetItemString(md, "__all__", public_interface);
 
4094
  Py_DECREF(public_interface);
 
4095
  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
 
4096
  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
 
4097
  for (i = 0; swig_const_table[i].name != 0; ++i)
 
4098
  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
 
4099
#endif
 
4100
  
3752
4101
  SWIG_InstallConstants(d,swig_const_table);
3753
4102
  
3754
 
  
3755
4103
  SWIG_Python_SetConstant(d, "VDisplay_BARCO",SWIG_From_int(static_cast< int >(vips::VDisplay::BARCO)));
3756
4104
  SWIG_Python_SetConstant(d, "VDisplay_DUMB",SWIG_From_int(static_cast< int >(vips::VDisplay::DUMB)));
3757
4105
#if PY_VERSION_HEX >= 0x03000000